4 ms·
So we're on our way to finish the re-creation of Java, by unifying the JavaScript and foreign code into a single bytecode format. Honestly I'm all for it, and
by remram 6y ago
So we're on our way to finish the re-creation of Java, by unifying the JavaScript and foreign code into a single bytecode format.
Honestly I'm all for it, and wouldn't change much since most JavaScript written today goes through compilation anyway (TypeScript and/or Babel). Only executing bytecode and taking out JavaScript parsers/interpreters would simplify browser implementations too. Just... what a roundabout trip it has been.
- overgard 6y agoI suppose it is, but Java applets never took off because they were horrible. Half the time they wouldn't work, and when they did they never felt like they were part of a page, and generally felt bloated and slow. Much more like a bad version of Flash than something that felt like part of a page.
- The_rationalist 6y agoThis implementation detail issue could be solved by integrating graalvm in the browser and with the DOM
- krapp 6y agoThere are plenty of languages other than this AssemblyScript that compile to Webassembly whereas only Java code compiled to Java bytecode. It's no more another Java than another C or Lua or any other language that just happens compiles to a binary or bytecode.
- kabes 6y agoA lot of languages compile to java bytecode. https://en.m.wikipedia.org/wiki/List_of_JVM_languages https://en.m.wikipedia.org/wiki/List_of_JVM_languages
- krapp 6y agoFair enough. How many of those languages are just considered reinventions of Java?
- acover 6y agoThere's an entire list of existing languages that compile to the jvm. A small sample: COBOL Common Lisp Haskell JavaScript Most of the languages are not similar to Java.
- lolive 6y agoScala is definitely NOT Java
- NeutronStar 6y agoNo, but he's arguing that Scala compiles to Java bytecode
- simplify 6y agoHow lucky the young must be, to not hear of Java nor JRE.
- remram 6y agoBy "Java" I meant the runtime, apologies.
- rat87 6y agoThere are far more languages that compile to Java bytecode then to javascript or Webassembly and it has been a thing for far longer. The Java virtual machine has a good jit-compiler(at least for java but often for other languages too) and a good garbage collector. It offers access to many useful libraries especially for desktop guis so its long been a target. Most popular languages targeting java include groovy, scala, clojure, Kotlin. Also Jruby is a fairly popular alternative ruby implementation on top of the JVM You're probably thinking of something like cpythons bytecode which is unstable internal only thing (breaking compatibility with minor python versions). Java bytecode has to be stable since it had to be shared by multiple jvm implementations. And even then a famous ruby hacker made a ruby-to-python-bytecode-compiler(now probably broken by version changes). https://news.ycombinator.com/item?id=2321204 https://news.ycombinator.com/item?id=2321204
- emteycz 6y ago> There are far more languages that compile to Java bytecode then to javascript or Webassembly No. There are far more languages that compile to Wasm.
- zcw100 6y agoI seem to remember that they eventually fixed the problem with slow startup for applets but it was long after people had stopped using them. Let’s not forget that when applets were a thing Java was a proprietary, although liberally licensed, from Sun Microsystems and the only JVM available was though them. I don’t even know what the status of it is to this day even though there are far more options than there were then. I didn’t touch Java for years because it was risky to invest time and energy into a language were the owner, Sun and now Oracle, could just yank it or start charging for the JDK at any time. It only became safe when it was successful enough that it became unlikely that thy would do something like that and there started to be viable alternatives. It’s easy to forget that Java had a huge cloud over its head foe many years.