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 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:
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.
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.
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.
I don’t want to give you more than you can handle. Let’s summarize what we have learned:
Kotlin is:
If you have further questions, just write a comment below. I will kindly answer your questions and update the article accordingly.