What is Kotlin?

Back to course overview

Hi and welcome to our first foundation lesson.

So you might be asking “What is this Kotlin that you have been already talking so wildly about?”

Preword: I already excuse for starting with a really dry topic. But I think this is at least necessary to have a big picture of what we are dealing with. Please stay with me. This is a short session and just after that we will get into practical coding.

Kotlin

The Kotlin Programming Language Logo

Kotlin is according to its creators Jetbrains a modern programming language that makes developers happier. I can second that!

Is is a general-purpose programming language since it can be user for a lot of different use-cases. Besides the use-case of writing programs to run on your machine, which is the focus of this series, there are way more:

  • Server-Side Development: Create Server Software with WebAPIs
  • Android Development: Create Android Application (Apps)
  • Web Development: Use Kotlin to generate JavaScript, the scripting language of the web
  • … many more

Technical

Sadly I can’t leave you without at least a bit of technical details.

This course will be focusing on the part of Kotlin which uses the Java Virtual Machine (JVM - (link to Wikipedia)[https://en.wikipedia.org/wiki/Javavirtualmachine]).

Our Kotlin code is able to get executed on almost any machine. All this we owe to the JVM. The JVM abstracts the Platform (e.g. Windows, Linux, MacOS) details. Our code is portable, we don’t need to care whether we target a MacOS machine or a Windows machine.

Compiler

A compiler is a program that converts Source Code into a format which machines understand. The Kotlin Compiler compiles our written Source Code to ByteCode that can be executed using the JVM.

More Citizens on the JVM

Kotlin is not the only JVM language. There are many more. The best known one is the Java Programming Language. Kotlin and Java are in a special relationship, since the Kotlin Creators spent a lot of effort to make both languages interoperable.

Interoperable means that Kotlin Code is able to reference Java Code and vice-versa. This is pretty rare in the world of programming languages.

The nice side-effect of this interoperability is that Kotlin is able to leverage the Java Ecosystem which has been there for more than 20 years.

Recap

I don’t want to give you more than you can handle. Let’s summarize what we have learned:

Kotlin is:

  • A programming language which has a lot of use-cases. The use-case we focus on is writing programs targeting the JVM.
  • The JVM allows us to execute our code on almost all platforms
  • There is a Compiler translating our Source Code into a machine-readable format.
  • Java and Kotlin are two very close programming languages. You should be able to learn Java pretty fast after this course (in case you ever want to do this)
  • Kotlin borrows from the Java Ecosystem and therefore you find plenty of Libraries and Frameworks

If you have further questions, just write a comment below. I will kindly answer your questions and update the article accordingly.

Start with setting up our IDE