What is Kotlin? Beginners Guide To Kotlin Programming

 



What is Kotlin?

  • Kotlin is a new programming language by Jetbrains. Jetbrains has developed various popular software like Android Studio, Intelli J Idea, Pycharm, etc.
  • Kotlin started out as a modern replacement of Java but now has been announced as an official Android language. This is the language of choice for Android Development.
  • Kotlin is a general-purpose programming language that can be used to target 
  • JVM (Kotlin's code can be compiled to Java ByteCode - which can be run on any JVM where Java runs)
      • Android Apps (Android is now Kotlin First)
      • Native Apps like macOS or Linux Apps can be created using Kotlin
      • JavaScript - You can transpile Kotlin code to JavaScript as well
  • Overall Kotlin is a powerful language that can be used to target multiple platforms and multiple environments.


History Of Kotlin

  • In 2011, Jetbrains announced the development of Kotlin.
  • It was made open source so that other developers can contribute. It is the language for the developers by the developers.
  • Kotlin 1.0 - was made live in 2016. 
  • After Google IO 2017, Kotlin started trending in the developer community. Most people from the Android community rapidly shifted towards Kotlin as Android provided first-class support for Kotlin. 
  • 2019, Android became Kotlin First i.e. Primary Language to develop Android apps.

 

Features of Kotlin 

  • Statically Typed Language -  Type checking is done at compile time. You cannot assign a string value to an integer variable. This helps prevent errors at runtime.
  • Object-Oriented Language - Kotlin is Object-Oriented Language - you can write classes, have objects. 4 key concepts of Object-Oriented Programming - Abstraction, Inheritance, Encapsulation, and Polymorphism are fully supported in Kotlin. Some of the implementation details of these features have improved from the Java world.
  • Functional Language -  Kotlin is a functional language. Concepts like Lambda functions, Higher-Order Function, First-class functions are supported in Kotlin as well. 
  • Interoperability with Java - Kotlin is 100% interoperable with Java. You can have Kotlin code as well as Java code in one project. You can even call Java code from Kotlin.
  • Safe Language, Concise, Powerful 
      • Null Safety - If you have done programming in languages like Java or C# - you must have encountered Null Pointer Exception or Object Reference Error.
      • Kotlin being a safe language provides null safety. It helps you write safe code that prevents nulls. 
      • Concise - You can easily write the logic in fewer lines of code. Less verbose and more powerful. 

  • Open Source - You can look into the source code of the language and appreciate the beauty of this powerful programming language. You can contribute to this project which can be found at this URL

That's it for this article. For more articles on Kotlin Tutorials For Beginner Series - refer to this.

Happy Learning !! Cheers From CheezyCode.

 

Comments

Popular posts from this blog

Create Android Apps - Getting Started

Polymorphism in Kotlin With Example