Sunday, 8 December 2019

What is Kotlin language ?




Hello awesome people,welcome to the my brand new Kotlin post .


In this post I will explain what Kotlin is and why you should invest time to learn it.
So without any further delay let’s start

What is Kotlin?


The first obvious question “What is Kotlin?”

In simple language :- Python+Java=Kotlin


Well, the easiest answer of this question is “Kotlin is a programming language.”
If you don’t know what is a programming language then let’s first try to understandit.
A normal user like you and me, we understand and communicate in natural languages like
English, Hindi, French or Dutch,ETC.



But a computer don’t understand natural language.A computer only understands the language
of 0s and 1s.Language of 0s and 1s is known as binary language or machine language.But
for a normal human being, it’s not possible to understand binary language.So what if we
want to perform a specific task on a computer, for example playing a song.How can we tell a
computer what to do?Here programming language comes in the picture.



A programming language is a set of instructions for the computer.Any user can write the
instructions for a computer to perform any specific task.Computer user can use any
programming language to write these instructions.Every programming language has it’s
own compiler or interpreter, which is capable to convert these instructions into binary
language.A computer can understand this
binary language and provide the output based on it.



There are lots of programming languages like C, C++, Java, Python, Scala and Kotlin isone
of them.Kotlin is the latest and powerful language for multiplatform applications.You can use
Kotlin for android application development or server side applications.You can write the code
in Kotlin and target both JVM and JavaScript.Recently Google announced Kotlin as official
language for Android application development.Let’s talk about the history of Kotlin
programming language.



In July 2011, JetBrains started “Project Kotlin”.JetBrains is the famous product Development
Company and creator of leading Java IDE “IntelliJIDEA”.Primary development of Kotlin
programming language is from the team of JetBrains programmersbased in Saint Petersburg
Russia.Name of the language comes from the Kotlin Island, which is situated near
Saint Petersburg.In February 2012, JetBrains open sourced the project under Apache 2
license.After 4 years of development, on February 15, 2015, Kotlin version 1.0 was released.
This was the first official and stable release of Kotlin. In March 2017, Kotlin version 1.1 was
released with the JavaScript support.Now let’s talk about the Advantages of Kotlin
programming language-First Advantage, Kotlin is a statically typed language.


It means type of the variable is known at the compile time.If you are going to write any Kotlin
code,then you must specify the type for each variable;otherwise Kotlin compiler won’t be
able to compile the code.The main advantage of statically typed language is, all type
checking can be done at the compile-time and therefore lot of bugs can be caught and
resolved at a very early stage of development.In statically typed language, since type of the
variable is known at the compile time,this helps compiler to generate optimized code.
Performance wise, statically typed language gives better result because they don’t
require extra run time type checking.Kotlin is an open source language.
In 2012, Kotlin was made open sourced and its source code was released under
Apache2 license.



It mean anyone can read, modify or distribute the source code.If you are curious and want to
look Kotlin code then visit this link below.Another great advantage of Kotlin is, it is
interoperable.It means you can easily convert the Kotlin code into Java or JavaScript.
There is no need to write the separate code.You can write the code in Kotlin and build it
for multiple platforms.If you are targeting JVM then you can easily convert Kotlin code into
Java language.Similarly you can also easily convert Java code into Kotlin code.You can also
mix Java and Kotlin code and leverage any existing JVM libraries withoutany difficulties.



You can also target JavaScript.Recently Google announced Kotlin as official programming
language for Android applicationdevelopment.You can also create Android applications with
Kotlin.Another awesome advantage of Kotlin is, it provides way to write concise code.
If you want to define plain old java object or POJO class in java, then you need to
writethe getters and setters for each variable.For example, look at this class.



This is a simple plain old java object or POJO class written in Java programming language.
It requires multiple lines of code, which is also very time consuming.In Kotlin you can write
the same class in just one line like this.And therefore, Kotlin reduces the amount of
boilerplate code.This helps in saving lot of development efforts and time.Kotlin is a tool
friendly language.You can use any IDE for Kotlin development.Some IDEs requires plugin
for Kotlin.If you don’t want to use any IDE and just want to do hands on then you can use
Kotlinonline editor.You can also build from the command line.



Kotlin programming language has easy learning curve.It doesn’t enforce any particular
programming philosophy.It supports both functional and object oriented programming
approach.Syntax and semantics of Kotlin are very similar to other programming languages.
If you are just a beginner then also you can easily learn and adopt Kotlin.If you are a java
developer, then you can easily convert the Java code into Kotlin usingKotlin converter too
l and start development in Kotlin programming language.

that's me signing off thanks for reading my article will see you in the next one






Previous Post
Next Post

post written by:

Hey! 👋 I’m Pratap, a Frontend Developer with 2+ years of experience crafting digital experiences through code and design. I specialize in frontend web development and UI/UX design, Through this blog, I share practical insights, tips, and learnings from my journey in tech and design. While naturally introverted, I'm passionate about contributing to the developer community. Dive into my blog for insights on these topics, and feel free to connect with me on Social Media

0 Comments: