Was Kotlin explicitly designed with usability in mind?


It seems like most programming languages were not designed with usability in mind. I find Kotlin pretty usable, for example because of the self explaining naming like init, vararg or because of error prevention like null-safety. But was Kotlin explicitly designed with programming language usability in mind?


I don’t think that Kotlin was explicitly designed with usability (in terms of that slide deck) in mind. It was designed by experienced high level programmers for their own use using best practices in other languages. I’m quite confident that it was not designed primarily for beginners and there are some corners of the language (delegates and especially overriding their binding or custom coroutines) that are not. Kotlin is very much a language kind to library writers, allowing them to create powerful, clear, interfaces even when doing so is not always “easy”. Overall I see the following properties in Kotlin’s design:

  • Designed for readability: code is read much more often than written, it is very important that it is easy to read so that code semantics are apparent and not snowed under in boilerplate or piles of generic parameters that the compiler already knows.
  • Conceptually coherent: Kotlin is very consistent in its design (much more than especially Java). Perhaps the long time in beta (with language changes allowed) really helped in that regard.
  • Powerful constructs. Kotlin uses a number of very powerful constructs and uses them to their maximum value (this creates no problems due to consistency - or “simple” design - we all know simple design is actually very hard)
  • Designed for library writing. All problems are different, the solution is to write libraries that provide the language to solve these domain dependent problems. From this philosophy much of the important language features are actually standard library features (often quite trivial in code, but essential for the language).
  • Aware of best practices in code patterns (and suitably opinionated). The language design is such that it attempts to make good practice easy and bad practice harder (or uglier ‘!!’)
  • Pragmatic. The language recognises the need for edge cases, exceptions to the rules and differences in taste. Everyone can have their own library.