3 ms·
Since there are many languages that now target the JVM, I guess my main distrust should be targeted towards that instead of the language itself. Can someone exp
by wickedchicken 15y ago
Since there are many languages that now target the JVM, I guess my main distrust should be targeted towards that instead of the language itself. Can someone explain to me what the advantage of running on the JVM is compared to something else (including native code generation)? From what I understand it provides: native tuned GC, stable and tuned JIT, and a class/module mechanism revolving around reusable code libraries (e.g., you could drop in a library written 6 years ago and have it 'just work,' when with C everything needs constantly shifting header files). I haven't used the JVM seriously in years, but I always got the feeling that around these core strengths were layers and layers of bureaucracy -- XML 'makefiles,' a stack-based VM that must inefficiently be translated to a register machine, and the feeling that everything is overengineered to the point that a simple "hello world" takes up gargantuan amounts of time and resources compares to things like Chicken Scheme or Go which have roughly the same features. Would anyone who uses JVM-based languages care to address these fears, I'm honestly curious if my hesitation is well-founded.
- justincormack 15y agoThe JVM allows commercial software to be usefully cross platform. If you are working with open source or scripting/jitted/non compiled languages this doesnt matter. Compiled C or C++ code was hard to get for the right architecture and work with. But it makes no difference for open source, hence the Linux coders disdain for VM languages, and it makes no sense with Python or Ruby where you interpret the source. And native JIT makes more sense now, the JVM being a bad language to write a JIT compiler for, as it loses a lot of important information.
- MrMan 15y agoYou have packed a lot of misinformation into one post. Cross platform does not matter for open source? People who use Linux also have a disdain for VMs like those that run Erlang, Python, Java, Scala, Clojure, etc? The JVM is probably the foremost example of a VM that uses JIT-ing really really well to achieve near-native speeds for a VM language.
- uriel 15y agoOf all the VMs you mention, the JVM is by far the least portable of all.
- uriel 15y agoThe JVM is "cross platform" if you only care about no more than three platforms. If you want to run it on anything else, you are pretty much SOL. This is not what anyone should call portable.