Stories of how popular programming languages originate are often fascinating.
The prototype of JavaScript (named Mocha back then) was created in just 10 days. Its creators first considered using Java, but they wanted to make a simpler language for Web designers.
Scala was created at a university by a scientist, Martin Odersky. He wanted to move some concepts from functional programming into the Java Object Oriented Programming world. It turned out that these worlds are connectable.
Java was originally designed in the early '90s for interactive television and set-top boxes by a team called "The Green Team" working at Sun. Eventually, this language was too advanced for the digital cable television industry at the time. It ended up revolutionizing general programming instead.
Many languages were designed for a totally different purpose than for what they are used for today. Many originated as experiments. This can be seen in them still today. The differences in the Kotlin story are that:
1.
Since the beginning, it was created and designed to be a general-purpose programming language, suitable for large applications.
2.
The creators of Kotlin are taking their time. Development of Kotlin started in 2010, and the first officially stable version was released in February of 2016. During this period, a lot has changed. If you find some code from the first proposals, it looks almost nothing like Kotlin today.
Kotlin was created as a Pragmatic language for practical applications, and this is reflected in its design. For instance, as opposed to academic or hobbyist languages, it never had ambitions to experiment with new concepts. Kotlin introduced a few new concepts (like property delegation) but the Kotlin team is very conscientious and they prefer to analyze how existing concepts have cooperated and worked for other languages. They are always trying to understand the strengths and weaknesses of other languages and build on them. It is a good strategy for JetBrains since it is the biggest creator of integrated programming environments(IDE). They have a lot of data and knowledge about how various languages are used. They also have specialists that understand each of those languages.
For that same reason, Kotlin is also different because it has reached a new level of cooperation between the IDE and the language. Code analysis in IntelliJ or Eclipse is done using the same compiler that is used to compile the code. Thanks to that, Kotlin can freely introduce more and more advanced smart casting and type inference without the necessity of IDE adjustments. The Kotlin team also supports developers by constantly improving IntelliJ warnings and lints. Because of this mechanism, most of the classic optimization hints don’t need to be collected in books or articles because they can just be provided via discrete warnings exactly where they are needed.
The philosophy of Kotlin
Every language has its philosophy that determines design decisions. The central point of Kotlin's philosophy is pragmatism. This means that in the end, all choices need to serve business needs, like:
•
Productivity - application production is fast.
•
Scalability - with application growth, its development does not become more expensive. It may even get cheaper.
•
Maintainability - maintenance is easy.
•
Reliability - applications behave as expected, and there are fewer errors.
•
Efficiency - the application runs fast and needs fewer resources (memory, processor, etc.).
We, as a programming community, have tried to satisfy those needs for quite some time. Based on our experiences, we have developed different tools and techniques. For instance, we have learned that automatic testing is very important to prevent errors that are accidentally added to one feature when someone modifies another.