Kotlin in Action

Author: Dmitry Jemerov and Svetlana Isakova
Publisher: Manning
Pages: 360
ISBN: 978-1617293290
Print: 1617293296
Rating: 4.5
Reviewer: Mike James

Kotlin is suddenly a very important language. This is one of our most popular book reviews of 2017 revisited in case you missed it.

Kotlin used to be an obscure JVM language that had some features that made it better than Java. It is also so compatible with Java that it is a good candidate as a Java replacement, but until recently it was its lack of wide support that made it seem like a risky option. Why bet the farm on a language that might disappear overnight with the company that created it? Not that JetBrains, its originator, looks like disappearing any time soon/ but it isn't as big as Google or Microsoft and Kotlin had no other significant corporate backers. Now all that has changed. Google has adopted it as the third language supported in Android Studio and it is now a first-class Android language. With Google behind it there is nothing stopping you from using it for new and existing Android project - and it has lots and lots of advantages compared to the long winded, verbose and ever more complex Java.

Banner

Although it starts from some very basic ideas, this is not a non-programmer's book. You probably don't have to program in Java to get something out of this book, but you do need to be able to program in some modern, object-oriented, language. Kotlin is a better Java and there is a tendency to explain what it does by pointing out what it does differently to Java.

The book is divided into two parts:

Introduction to Kotlin

  • Kotlin basics
  • Defining and calling functions
  • Classes, objects, and interfaces
  • Programming with lambdas
  • The Kotlin type system

Embracing Kotlin

  • Operator overloading and other conventions
  • Higher-order functions: lambdas as parameters and return values
  • Generics
  • Annotations and reflection
  • DSL construction

It has to be said that there isn't a great deal of difference between the two parts of the book and they feel more like simple topics and more advanced topics. However, there isn't much in the way of logical progression of completeness. This is more like a collection of topics that stand out as being different from the way Java does things. This is fine, especially as the topics are explained well and you do need to know about them. Don't expect a traditional textbook that progresses in a logical way to cover most of the language.

kotlinaction

 

The explanations are good and they provide a starting point, but many of the discussions don't take us very far from what is presented in the online documentation. If you are looking for an investigation of what impact the way that Kotlin does things has on how you program then you will be disappointed. It is also clear that the authors are very pro-Kotlin and as such there are few places where deficiencies of the language are pointed out. Kotlin may be better than Java, but the need to stay compatible with the language means that it sometimes has to do things in non-optimal ways.

This isn't the perfect book on Kotlin, but it is well worth having as long as you read it as a collection of topics rather than a logical progression. If you are thinking about switching from Java to Kotlin it will help and repay the money you spend on it.

 

To keep up with our coverage of books for programmers, follow @bookwatchiprog on Twitter or subscribe to I Programmer's Books RSS feed for each day's new addition to Book Watch and for new reviews.

Banner


Exploring Raspberry Pi

Author: Derek Molloy
Publisher: Wiley
Pages:720 
ISBN:  978-1119188681
Print:1119188687
Audience: Intermediate to advanced IoT programmers
Rating: 4.8
Reviewer: Mike James

Interfacing to the Real World with Embedded Linux sounds like it could be fun.



The Logician and the Engineer

Author: Paul J. Nahin
Publisher: Princeton University Press
Pages: 244
ISBN: 978-0691151007
Print: 0691151008
Kindle: B0091XBUTM
Audience: Electronics enthusiasts interested in the origins of computing
Rating:  4
Reviewer: Harry Fairhead

George Boole and Claude S [ ... ]


More Reviews

<ASIN:1871962536>

<ASIN:1871962544>

 

 

 

 

 

 

 

Last Updated ( Wednesday, 27 December 2017 )