What is Kotlin?

Kotlin is a multi-purpose programming language that runs in the JVM. In many ways, it’s what Java would have been had it been designed 20 years later.

Kotlin code is much more concise than the equivalent Java. It has native features that address many of the gripes that programmers have about Java, including the following:

  1. Null safety is built-in.
  2. Fields are implemented as Properties that include default (but configurable) getters and setters.
  3. The ability to add methods and fields to classes without formally extending them.
  4. Semicolons are optional!
  5. Automatic inference of data types when declaring Variables
  6. Default values in method signatures, reducing the need to overload methods.

Kotlin is 100% compatible with Java, so you can freely use any libraries that are written in or for Java. With a few caveats, you can also call all of you Kotlin code from Java. You can even mix Kotlin in with Java in the same project!

Of course, Kotlin works really well with JavaFX. In fact, JavaFX is way better with Kotlin than it is with Java.

Read More…

I’ve written a few articles about Kotlin, you can find them here:

18 minute read

Interested in programming JavaFX in Kotlin? Here’s what you need to know to write JavaFX code that is so much better than anything you can write in Java.

19 minute read

Need to understand a Kotlin program, but you only know Java? This article should give you everything you need to know to get started.

11 minute read

Kotlin has been described as, “The language that Java would have been if it had been designed 25 years later”. It’s starting to pick up popularity, and has had a boost from being endorsed by Google for Android development.But you’re not an Android developer, so should you learn, and use, Kotlin?

4 minute read

An approach to implementing the JavaFX Property “bean” structure for observable objects in an idiomatic Kotlin fashion.