2 ms·
I agree it seems that way, but IMO JavaScript/v8 only exists (or is only the defacto client-side runtime) because Sun/Oracle messed up the Java/JVM trajectory a
by stephen 9y ago
I agree it seems that way, but IMO JavaScript/v8 only exists (or is only the defacto client-side runtime) because Sun/Oracle messed up the Java/JVM trajectory at least twice.
1) was Sun making applets suck so bad, e.g. the JVM itself was too slow pre-JIT, classloading over the wire sucked, DOM interaction was hard (AFAIU/IIRC), etc.
I don't think any of these problems were fundamental to "put a VM in the browser", as conceptually Java & JS VMs aren't that different: the trade-offs JS/Brendan picked just worked better.
2) was Oracle being so lawsuit happy, as I think Dart could have been "just a faster/better browser-based JVM" (basically applets done right/with a great pre-JIT JVM) and not the combined "new language + new VM + new ecosystem", had Google felt comfortable using the Java language. It would have made a ton of sense, to reuse all their existing/internal Java tooling/knowledge/etc. But not with Oracle already breathing down their neck re Android.
Anyway, agreed it doesn't seem that way, but I think v8's success is actually more related to Sun/Oracle/Java's mistakes/missed opportunities than is initially apparent.
Not complaining, as we're in a great place now with v8/TypeScript/React Native being basically "the VM + type-safe language + framework that Java could have been", but with legitimately awesome features e.g. TS's type system, RN hot loading, etc.