Hacker News new | ask | show | jobs
by BJanecke 3316 days ago
Kotlin is really nice and I am very happy to have more than one great/fun/productive language however I feel like mentioning typescript might be worthwhile (yes I know it's "just" a superset of JS and you have a personal gripe with whatever you think JS is but hear me out).

* Runs everywhere js/asm

* MIxed bag of tooling, but generally you can find something amazing and you won't have to venture to sourceforge or similar to submit a patch

* Doesn't suffer from the coljure/scala "We can totally use other JVM libraries but we only really do that If we have no other option"

* Absolutely beautiful generics and spot on inference

   ```
    function pluck<T>(key: keyof T, from: T[]) {
       return from.map(item => item[key]);
     }
   ```
* First class functions

* Incredible flexibility

   * sketch in js then annotate  

   * decide on strict nulls

   * decide on implicit types

   * various approaches to composition 
* Amazing IDE support(VSCode)(This technically falls under tooling ;))

* One of the few cross-platfrom languages that feel pretty much identical on all the platforms

[edit] Formatting