Hacker News new | ask | show | jobs
by kaba0 1294 days ago
It is easy to iterate fast on language design when you don’t care about backwards compatibility.

> Very few languages can do all 4. JVM ones can't

Java can (JIT is trivial, for AOT there is among others Graal, for JS and WASM there is TeaVM (which works on class files, so now that I think about it, pretty much every JVM language can do all platforms), but also the very great Closure compiler (j2cl) which has no relation to cloJure, made and used heavily by google)

1 comments

Backwards compatibility is overrated, sticking to it too hard is how we get stuff like JS or C++ that have ten different ways of doing the same thing. I'd much rather a language be improved and break sometimes than to convolve around keeping strict BC. Anyway, they have good BC support since Dart 2 released several years ago so I'm not worried.

With your Java example, that's exactly what I mean, you don't need 4 different tools in Dart to achieve the 4 types of compilation, they're all included in the standard Dart compiler/SDK. Sure, if we go by your definition, probably any language has some level of support for each via various random compilers but I'm talking about something first-class, built-in.

> Backwards compatibility is overrated, sticking to it too hard

While there is surely a very delicate balance of slowly deprecating a few things, remember that the only significant productivity booster is relying on existing code (as per Brooks).

I’m fairly sure there are orders of magnitude more Java code transpiled to JS running at Google than all of their Dart codebases combined, so not sure “random compilers” are a fair description.