Kotlin: How Can a Programming Language be so Young And so Mature at The Same Time?
Tags: discuss, kotlin, java, productivity
Published: 2019-01-12 09:48:06

---
title: Kotlin: How Can a Programming Language be so Young And so Mature at The Same Time?
published: true
description: In this article, we’re going to explore why young programming languages with modern features can’t be adopted quickly. Additionally, we’re going to take a look at one exceptional example that got specific parameters right to be both young, modern and mature, just ready for adoption at small and big scale.
tags: discuss, kotlin, java, productivity
canonical_url: https://iwillteachyoukotlin.com/2019/01/07/kotlin-how-can-a-programming-language-be-so-young-and-so-mature-at-the-same-time/
cover_image: https://iwillteachyoukotlin.com/wp-content/uploads/2019/01/young-mature-programming-language-cover-top.jpg
---

In this article, we’re going to explore why young programming languages with modern features can’t be adopted quickly. Additionally, we’re going to take a look at one exceptional example that got specific parameters right to be both young, modern and mature, just ready for adoption at small and big scale.

_DISCLAIMER: Some details are omitted intentionally. Keep your mind open when reading. If something seems naive, or not entirely true, bear in mind that the author thought into both the front and back sides of the coin, and the unseen third side of the coin, as well. You’re welcome in comments for a more in-depth discussion—it’s going to be worth your time for sure!_

We all know that most of us, software developers, love to chase after shiny things just as much as we like to build them. This is not different for programming languages.

And, in this day and age, new young programming languages pop up like these mushrooms:

![](https://iwillteachyoukotlin.com/wp-content/uploads/2019/01/young-mature-programming-language-cover-1024x768.jpeg)

## Why new modern languages can’t be adopted quickly?

A distinct feature of a young language is that creators and community gets the chance to experiment with different features and designs to potentially fix some problems of the existing mature languages. Mind you, any solution to any problem will bring minimum two more subtle issues. So this cycle of continuous improvement will never end.

While young languages can explore more advanced features and designs, they usually don’t have a robust ecosystem of libraries, frameworks, and tooling. Moreover, when the community develops these, people will still have to learn them, and that means that they (albeit temporarily) will be much less productive. And I’m not even going to talk about potential vulnerabilities, bugs, and so on.

Now, wouldn’t it be great if the new young modern language could rely on the existing mature ecosystem? Wouldn’t it be fantastic if using existing libraries, frameworks and tooling was entirely natural and not awkward at all?

[![](https://iwillteachyoukotlin.com/wp-content/uploads/2019/01/young-mature-programming-language-quote-1-1024x549.png)](https://twitter.com/intent/tweet?source=https://iwillteachyoukotlin.com/kotlin-young-and-mature-programming-language-at-the-same-time/&text=%E2%80%9CNow,%20wouldn%E2%80%99t%20it%20be%20great%20if%20the%20new%20young%20modern%20language%20could%20rely%20on%20the%20existing%20mature%20ecosystem?%E2%80%9D%0A%0A%E2%80%94https://iwillteachyoukotlin.com/kotlin-young-and-mature-programming-language-at-the-same-time/?q=1)

If you ask me these questions, I’ll tell you that you’re perhaps describing Kotlin. Kotlin is a programming language where you can naturally use any library, framework or tool from the JVM ecosystem without any awkwardness.

Now, there were languages before, that could do that as well, like Scala, Groovy, Clojure, and so on. And they all got something wrong: natural use.

## Why these languages don’t want to rely on the existing mature ecosystem?

Either it wasn’t natural to use the same framework or library, or it was even impossible to use the same tooling. And in the scenario where it would be possible to use same tooling, framework, and libraries naturally; somehow, the majority of the community went out there and built new tools, frameworks, and libraries (I’m looking at you, Scala, and sbt).

My hunch is that this happens because most of the early adopters of these new languages (“promised replacements for Java”) have somewhat an adversarial relationship with Java language and JVM ecosystem.

They hate it.

As early adopters, they set the playing field, because they are in the vast majority in the community during the first few years of the new young language. This way, they get to write all the brand new shiny tools, frameworks and libraries. And they are the ones who start new projects in these languages at actual companies and startups.

This way, the community style sets in: unique tooling, frameworks, and sets of libraries that people use. Sometimes, these are even designed on purpose to be radically different from their older alternatives from the JVM community.

This makes the learning curve very steep, and so the language gets adopted only by like-minded people, and poor developers who just have no choice but to maintain the codebases where this set of tools is being used already.

## How to attract different early adopters that will be happy to leverage existing ecosystem?

Kotlin is radically different from this approach. The playing field rule number one: “100% bidirectional interoperability with Java and JVM ecosystem.”

Thus the community attracts fellows who are not looking to do everything in the entirely different approach; instead, they want a  more modern language, AND they want to transfer their skills, knowledge, and experience from working with the mature ecosystem like JVM.

These early adopters don’t want to rewrite their existing codebases entirely because they are large, so being able to write only new code in Kotlin, and keep older code in Java helps a lot!

## Small story of a fellow software engineer

I’m going to give you a tangible example:

Clara is a software engineer, working for a big organization, mostly working with Java, JVM, and Spring Boot. Clara’s professional level is senior and perhaps even beyond that:

- she applies best software practices,
- knows how to design simple software iteratively,
- can solve any complex problem you throw at her,
- knows her audience when writing the code (current and expected in the future level of her team members),
- excellent communicator and team player,
- teaches and mentors other developers,
- can take on the role of a team lead today,
- and lives the life of a life-long learner.

Her current development workflow includes building the application and automating development tasks with Gradle, and she gets her coding done within a modern IDE like IntelliJ. She doesn’t have any of the adversarial feelings towards any of these tools and technologies.

Quite the opposite: she loves them!

Sometimes though, she feels feature envy to all these cool modern programming languages where you could have one-liner data classes, less boilerplate in general, and the null-pointer exception is not a dreaded threat at every step.

And here is Kotlin programming language that recently became “production-ready.”

So she tries out to build a tiny web app (a tad more complicated than “Hello world”). And it seems like she can still use the same build tool—Gradle; and she still can use any of her favorite libraries, and much more critical, she can use the same web framework—Spring Boot.

And using all these things is not awkward at all, and feels just as natural, as in their “home” environment—Java.

Now, she has the next question: “This language is great but quite new… do I have to lose all the great features of my IDE now?” Because that is what happens to most modern languages—the IDE support is lagging way… way behind.

[![](https://iwillteachyoukotlin.com/wp-content/uploads/2019/01/young-mature-programming-language-quote-4-1024x549.png)](https://twitter.com/intent/tweet?source=https://iwillteachyoukotlin.com/kotlin-young-and-mature-programming-language-at-the-same-time/&text=%E2%80%9CThis%20language%20is%20great,%20but%20quite%20new…%20do%20I%20have%20to%20lose%20all%20the%20great%20features%20of%20my%20IDE%20now?%E2%80%9D%0A%0A%E2%80%94https://iwillteachyoukotlin.com/kotlin-young-and-mature-programming-language-at-the-same-time/?q=2)

And now she gets pleasantly surprised: 95% of the IDE features that she needs are there and are supported:

- basic and advanced refactorings,
- jump to definition, 
- find usages, 
- running application and tests from IDE, 
- running a single test in the current context,
- debugger,
- code completion, even cross-language,
- etc.

And this makes so much sense because the language is developed by the same company that develops the IDE (JetBrains). This certainly ensures that the tooling will be at least somewhat up to speed with the new modern language.

“This all sounds great!” Clara thinks, “Do I have to rewrite my application at work now fully to Kotlin?”

## Most important playing field rules fostering the adoption

And she gets pleasantly surprised here as well. All she really needs to do is to add Kotlin Gradle plugin (few lines of change in a single file), and she can start adding Kotlin files to the source code base. All the old files, written in Java, are still working correctly.

Moreover, cross-language calls are working out of the box: she can call Java code from Kotlin, and Kotlin code from Java; AND it all feels just as natural. At almost no point, the calling code is even aware that it is calling one or the other because there is no difference.

That is what making “100% interoperability” a most significant playing field rule right from the beginning can do for the new modern language! 

So if you’re going to design a new programming language, I suggest you consider imbuing it as one of the top priorities, as it will allow for much better adoption. And what creator of the library, tool, or language doesn’t want this kind of adoption superpower? ;)

[![](https://iwillteachyoukotlin.com/wp-content/uploads/2019/01/young-mature-programming-language-quote-2-1024x549.png)](https://twitter.com/intent/tweet?source=https://iwillteachyoukotlin.com/kotlin-young-and-mature-programming-language-at-the-same-time/&text=%E2%80%9CAnd%20what%20creator%20of%20the%20library,%20tool,%20or%20language%20doesn’t%20want%20this%20kind%20of%20adoption%20superpower?%E2%80%9D%0A%0A%E2%80%94https://iwillteachyoukotlin.com/kotlin-young-and-mature-programming-language-at-the-same-time/?q=3)

As you could notice, Clara is not looking for an entirely radically different approach to coding, and instead, she is looking for a way to keep 75% of what is working well, and perhaps use a few more modern features of the language to improve the other 25% significantly.

This could be reducing the amount of the boilerplate by letting the language figure out the obvious so that you don’t have to specify it every time. This could also be a different decision to make everything an expression, which makes specific scenarios much more ergonomic and more comfortable to read, for example, try-catch block, where you need to set a variable in the “try” part and rethrow an enhanced error in the “catch” part.

These things and more are improving the readability significantly.

Additionally, the ability to have first-class immutable variables and nullable/non-nullable types eliminates whole classes of possible mistakes and errors. It is fantastic!

## Stand on the shoulders of the giants!

Most of the modern languages are created to be used standalone, detached from the existing library and tooling ecosystem, either by design or “forced” by community guidelines or culture.

These modern languages might see some adoption, but they will eventually die out or stay in the small niche because the majority of professionals will just continue using the mature ones because they have better support for literally everything. There are rare, infrequent, exceptions from this rule.

If the new programming language wants to stay strong, it needs to stand on the shoulders of the giants.

[![](https://iwillteachyoukotlin.com/wp-content/uploads/2019/01/young-mature-programming-language-quote-3-1024x549.png)](https://twitter.com/intent/tweet?source=https://iwillteachyoukotlin.com/kotlin-young-and-mature-programming-language-at-the-same-time/&text=%E2%80%9CInstead%20of%20going%20against%20the%20former%20mature%20language,%20and%20doing%20everything%20differently,%20leverage%20as%20much%20as%20you%20can%20from%20the%20mature%20ecosystem,%20and%20add%20more%20value%20on%20top%20of%20that.%E2%80%9D%0A%0A%E2%80%94https://iwillteachyoukotlin.com/kotlin-young-and-mature-programming-language-at-the-same-time/?q=4)

So, instead of going against the former mature language, and doing everything differently, leverage as much as you can from the mature ecosystem, and add more value on top of that. This way, people, when learning this language don’t have to give up anything, and they only stand to gain— a real win-win situation!

> Did that spike your curiosity about Kotlin?
> 
> I have written a 4-part (350-pages total) “[Ultimate Tutorial: Getting Started With Kotlin](https://iwillteachyoukotlin.com)” (+ more to come), and you can get it as a free bonus by becoming a member of my monthly newsletter.
> 
> On top of just Kotlin, it is full of goodies like TDD, Clean Code, Software Architecture, Business Impacts, 5 WHYs, Acceptance Criteria, Personas, and more.
> 
> —Sign up here and [start learning how to build full-fledged Kotlin applications](https://iwillteachyoukotlin.com)!

## Thank you and ask for you!

Thank you so much for reading this article! I hope you enjoyed it. Please, tell me what you think about this in the comments!

Also, it would make me so much happier if you could share this post with your friends and colleagues who you think might benefit from it. Or you could share it on your favorite social media!

You are welcome to [read my blog about Kotlin](https://iwillteachyoukotlin.com/blog/), and [my blog about TDD and best software engineering practices](http://www.tddfellow.com/).

And [let’s connect on LinkedIn](https://www.linkedin.com/in/oleksii-fedorov-b0b81186/): I post short weekly updates about software developer’s productivity and happiness, teamwork, mental health, and a bit about Kotlin.

If you want to hear more of my opinions, [follow me on Twitter](https://twitter.com/intent/follow?screen_name=waterlink000).

---

_Originally published on [iwillteachyoukotlin.com blog](https://iwillteachyoukotlin.com/2019/01/07/kotlin-how-can-a-programming-language-be-so-young-and-so-mature-at-the-same-time/)._

_cover image source: [pexels](https://www.pexels.com/photo/forest-moss-mushrooms-tree-stump-62315/)_