Alex Nedelcu on Nostr: I like Kotlin's approach to multi-platform targeting (e.g., JS, WASM, Native) more ...
I like Kotlin's approach to multi-platform targeting (e.g., JS, WASM, Native) more than I like Scala's.
Scala has a big standard library, which also depends on Java's library. So the approach was to reimplement a significant chunk of Java's stdlib for JS and native, with all the baggage. Kotlin's approach was much lighter.
On a recent toy project, for the same code, the compiled production binary's size is:
‣ Scala.js —159K
‣ Kotlin/JS — 44K
#Kotlin #Scala
Scala has a big standard library, which also depends on Java's library. So the approach was to reimplement a significant chunk of Java's stdlib for JS and native, with all the baggage. Kotlin's approach was much lighter.
On a recent toy project, for the same code, the compiled production binary's size is:
‣ Scala.js —159K
‣ Kotlin/JS — 44K
#Kotlin #Scala