loading...
Cover image for Kotlin FYI: Kotlin In Thirty Seconds
Microsoft Azure

Kotlin FYI: Kotlin In Thirty Seconds

nitya profile image Nitya Narasimhan Updated on ・2 min read

(cover image credited to unsplash/@mreichelt)


Interested in Kotlin? 3 things you can do right now:

  • 🔖 Bookmark this page ☝🏽☝🏽 | Be notified of updates!
  • ✅ Follow #kotlinfyi and #kotlin tags | Find relevant people!
  • 📚 Read my Kotlin FYI series | Start your #30Days Journey

About Kotlin

The inthirtyseconds tag challenges you to explain a concept in 30 seconds or less. So here goes - a visual guide to Kotlin! Did you scan it in under a minute? I bet you learned something too - I call it a win!


Visual sketchnote explaining Kotlin - what it is and where it can be used


By definition Kotlin:

  • is a modern programming language
  • that is open-source
  • that is safe, concise and interoperable (with Java)
  • that is tool-friendly (IDE & CLI)
  • that transpiles to Javascript

Kotlin is good for:

  • mobile cross-platform development (Android + iOS)
  • native development (embedded OS)
  • web development (transpiled to JS)
  • server-side development (Java server-side frameworks)
  • data science (Jupyter Kotlin kernel)

It is also the preferred programming language for Android


About Modern Programming Languages

So what is a modern programming language? This article explained it best; it's one that takes advantage of modern day software development tools, techniques and ecosystems including:

  • multi-core CPU
  • GPU (acceleration)
  • fast networks
  • mobile devices
  • cloud computing
  • container architectures

As a result, it incurs less technical debt (to sustain legacy code) and demonstrates productive characteristics like:

  • concise code (less boilerplate)
  • built-in concurrency (async operations)
  • null pointer safety
  • type inference
  • lower cognitive load
  • simpler feature set

Kotlin is one of the fastest growing modern programming languages (alongside Dart and Rust). Two signature features include its structured concurrency (coroutines) and ability to share code across targets (multiplatform).

Kotlin vs. Java

Android is now Kotlin-First making Java the secondary choice for development. So how does Kotlin relate to Java?

  • Java ("programming language") is verbose and complex but the JVM ("runtime") is battle-hardened and efficient.
  • Kotlin makes the programming language simpler & modern while remaining 100% interoperable with the JVM, allowing existing Java libraries to be used

That's probably more than 30 seconds worth but I hope it was useful. Questions or comments? Leave them below - and keep checcking back for updates!

Posted on by:

nitya profile

Nitya Narasimhan

@nitya

PhD & Polyglot / Senior Cloud Advocate @Microsoft - Mobile, Web, Fusion Dev / I translate awareness of technology into actionable learning for personal and professional development / Try-Fail-Learn

Microsoft Azure

Any language. Any platform.

Discussion

markdown guide
 

Nice, So will Kotlin replace Java in future ?

 

I hope so. But what I see nowadays is Java developers writing Java code in Kotlin. What was

SmartAbstractSesionFactory sasf = new SmartAbstractSesionFactory()

has become

var sasf = SmartAbstractSesionFactory()

 

I don't think anything can replace Java given the long history and usage across mobile, consumer and enterprise domains. Java is (and will likely remain) one of the most valuable skills for coders to learn for career/job reasons. Java was created at Sun Microsystems and is now overseen by tech giant Oracle. So it's not going anywhere.

Kotlin was created by a smaller company (JetBrains) and is open source. And they primarily build tooling and IDEs. What Kotlin started off as is a simpler modern language that was 100% compatible with Java (compiles to code that runs in any JVM) but allows you to write your code with simpler, cleaner semantics and syntax. I'm still learning but I see it as a higher level language that can be used to write apps that can then run in different existing environments (transpile to JS, run in browser; compile to byte code, run in JVM on device or in server-side)

 

No, they will coexist. There is plenty of space.