3 ms·
Kotlin is much closer to Java than to TypeScript even in terms of flexibility.
by quonn 2y ago
Kotlin is much closer to Java than to TypeScript even in terms of flexibility.
- DarkNova6 2y agoTo me "Flexibility" sounds a lot like "The programmer always knows what he does".
- scotty79 2y agoFlexibility means for me more something more like, I think I know what I want to do but I also know that I'm probably wrong about that, so for now let's skip all the baroque protocol and let me make it work first. Once I'm sure I wrote what I actually wanted I'll add types if only to get rid of some bugs, consider edge cases and earn nice code completions and auto-generated docs.
- sgammon 2y agoSure, but Kotlin is to Java as TypeScript is to JavaScript, which is the point I am making.
- wiseowise 2y agoThat’s not even remotely true. TypeScript is a direct superset of JavaScript. Any valid JS is a valid TypeScript. If Kotlin is what TS to JS, then so is Groovy, Scala, Clojure and other JVM languages.
- sgammon 2y ago> TypeScript is a direct superset of JavaScript. Any valid JS is a valid TypeScript. Kotlin on JVM is a direct superset of Java on JVM. Any valid Java is also valid Kotlin at the bytecode layer. > If Kotlin is what TS to JS, then so is Groovy, Scala, Clojure and other JVM languages. Correct
- sgammon 2y agoLaughs in `: dynamic`