benlowery.co.uk

Kotlin in Action (11/2019)

Author(s): Dmitry Jemerov/Svetlana Isakova)
ISBN: 9781617293290

As a huge fan of JetBrains and IntelliJ IDEA, I was excited when they released v1.0 of Kotlin in 2016 (doesn't that seem like a life time ago now?).

A modern functional programming language designed to work perfectly with and around Java but with many of the draw-backs removed - what wasn't to like.

As is often the case it was a while before I actually got to take a look at the language and when deciding which book to try it was a bit of a no-brainer as a fairly new language Kotlin lacks the vast numbers of books of something like Java or C++ has but one written by core developers on the Kotlin team was the obvious choice.

I was not disappointed - it's rare to run into a book that concisely covers both the "what and why" of a programming language so well, in many ways it feels like reading "The C Programming Language" but for Kotlin - which is about the highest praise I can give any programming language book.

The chapters are broken down in a very space efficient way with the earlier ones been devoted to "what and why" (see above) with the inclusion of a brilliant chapter (1.4) titled The Philosophy of Kotlin something I wish more programming language books would focus on early.

They also cover the very basics of Kotlin specifically and not programming generally (This would not be a good first programming book - but it is clear that neither was that the intent)

Moving quickly past that it goes over collections and functions and how Kotlin can both extend other classes (including Java Classes) before moving onto Kotlin Classes, Objects, and Interfaces I really like this structure, they start from the bottom and work upwards and the didactic but terse language suits it well with adequate but short examples that you will need to focus on since they don't hammer the point with repeated examples.

Beyond that they move into the type system, overloading, higher order programming, generics, reflection - all things you'd expect given a functional programming language but the final chapter on DSL construction is a particular bonus.

All in all I found this to be an outstanding book for it's intended purpose - to introduce the core of a new language to an experience programmer and the provided examples are sufficient to illustrate the point under discussion without hammering the point home.

5/5 - Would (and have) recommended.