4 ms·
I like Kotlin as well. One of the nice things about that language is just the enormous amount of attention to detail when it comes to usability of the language.
by jillesvangurp 5y ago
I like Kotlin as well. One of the nice things about that language is just the enormous amount of attention to detail when it comes to usability of the language.
Kotlin's lambda syntax is actually similarly verbose. But they allow you to use a default argument called it.
list.map { it+1 }
is equivalent to
list.map { oldValue -> oldValue+1 }
Still readable and you can easily just rename the it variable in your IDE to save a bit on typing. There are many examples in the language where little time saving syntactic sugar just helps the programmer having to type a lot. Kotlin internal DSLs are really nice once you wrap your head around how to create them. That's a trick they picked up from the ruby community.
However, I do also appreciate just how far ahead of its time Smalltalk was. I played a bit with it in the nineties while in university around the time Java was released and had no IDE whatsoever. Refactoring, which is a super power now granted to those using Java or Kotlin and in much smaller quantities to users of other languages was actually invented in the smalltalk community. They had IDEs with refactoring built in as early as the late nineties. They pioneered a lot of good stuff. Sadly, the tool chain was a bit weird to deal with because another of their innovations was storing the program code in a database rather than a lot of text files. That actually facilitated a lot of the stuff that you could do with smalltalk. That's something that never caught on but wasn't necessarily a bad idea. I think Visual Age had this briefly for Java and then got rid of that when it became eclipse.
A notable smalltalk dialect called self also existed. Together with Javascript, that's one of the few object oriented and protype based languages around. I think that was something that emerged out of Xerox and Sun in the eighties. Sun did some amazing things around that time. Such a shame that they ended up being gobbled up and destroyed by Oracle.
I think you could say that smalltalk is to object oriented programming what lisp and scheme are to functional programming. They are the purest realization of those paradigms but ultimately they have proven less popular than more practical languages that are maybe a bit less pure. Kotlin is a great example of a language that has enough of the OO and functional heritage to be useful for both. They definitely cut some corners here and there and there's plenty for a functional language purist to take offense at. But for day to day usage, it's a very nice language.
- VaxWithSex 5y agoThanks for this nice writeup :)
- brabel 5y ago> That's a trick they picked up from the ruby community. Pretty sure they picked it up from Groovy, which itself picked it up from Ruby and Smalltalk first.