…And Why Not?

On the other hand, Kotlin is one of the most complex programming languages ever created. For most code, Kotlin can be concise. However, in many cases, that is because the “real code” is hidden, supplied by standard libraries. The programming techniques that allow those libraries to let you write concise Kotlin code are also available to you, and that is where the complexity lies.

Fortunately, most of that complexity can be ignored at the outset. That complexity exists for “power users” of Kotlin, such as people developing other Kotlin libraries. They too can use those techniques to make their libraries easy to consume. However, many developers will never examine the code of such a library, let alone create one, and so for many developers, this complexity is something that will be encountered only rarely.

Kotlin also lends itself towards terse programming. “Concise” is “short but understandable”, while “terse” is “short, but perhaps not understandable”. Keeping Kotlin code short but still readable, particularly by newcomers, is the sort of thing that some Kotlin developers ignore in a drive to minimize the number of characters in their Kotlin source code.


Prev Table of Contents Next

This book is licensed under the Creative Commons Attribution-ShareAlike 4.0 International license.