3 ms·
Is a bytecode language still a useful concept, though? It might have been when we had lots of ISAs, especially in education. When Java came up (its original pur
by tannhaeuser 8y ago
Is a bytecode language still a useful concept, though? It might have been when we had lots of ISAs, especially in education. When Java came up (its original purpose being used on set-top boxes) we had Power, MIPS, Alpha, 68k, HP-RISC, Sparc, and many others. Now there's only x86/64 and ARM/64 left.
- macintux 8y agoIt still gives you OS independence. And, at least in the case of something like the BEAM for Erlang et al, you can optimize the VM for the language. Heck, besides Java and Erlang, you’ve got Apple with Bitcode for the Watch. https://thenextweb.com/apple/2015/06/17/apples-biggest-developer-news-at-wwdc-that-nobodys-talking-about-bitcode/ https://thenextweb.com/apple/2015/06/17/apples-biggest-devel...
- bullen 8y agoThe article is wrong, the advantage of bytecode is not portability; but memory allocation, failure handling and dynamic classloading. A Java SE process never crashes unless you leak memory, which is super easy to avoid and profile with a heap dump, so you can sleep when you release code on servers. That's the real reason for Java's success. I would never code C for servers. And if I code for a hydroelectric dam, I would use Java SE! Not kidding!
- astrange 8y agoJava is not really safe from mistakes, if you type the wrong code you will still get the wrong program. Even for 90s programming systems I recommend you try Erlang.
- bullen 8y agoErlang is single threaded, I would never use Erlang on multi core processors, ie. I would never use Erlang period! If you downvoted because Java is not safe from mistakes (duh), I suggest you try using C/C++ just for fun. If you use C/C++ on server systems for salary you will burn out.
- pjmlp 8y agoIf you only care about mainstream computers, x86/64 and ARM/64 might seem like the only ones left standing. However, when one looks how broad the embedded market is, there are plenty of CPUs around, many of those do actually have some variation of Java compilers available to them. Also bytecode as portable executable format allows to take advantage of CPU improvements inside the same family as well. For example, on x64 the Oracle, IBM and Azul JIT compilers will take advantage of AVX512 if present. Likewise on Android phones, it may say ARM, but each OEM licensed silicon looks quite different. If anything, with bitcode for Apple watchOS, DEX on Android, MSIL on Windows Store, WASM on the Web, and the old mainframe variants still in use, we are seeing a rise on its use.