Re:Erlang Doesn’t Fit The JVM
by noss on Friday April 03, 2009 @09:04AM
(#544840)
Isn't LLVM a more interesting universal machine to target anyway?
[ Parent
| on HN ]
Isn't part of the reason for targeting the JVM the ton of libraries you get for free?
How many of them fit idiomatically into the language you choose to use on the JVM?
Clojure does a good job of introducing new idioms specifically for Java support.
From their docs:
(doto (new java.util.HashMap) (.put "a" 1) (.put "b" 2))
(.. System (getProperties) (get "os.name"))So, in other words, it doesn't fit into preexisting languages idiomatically. You want to introduce new idioms into Closure to make it integrate better with the JVM.
That's fine, but it also means that if you want to do a direct port of, say, Ruby or Python or Erlang, you'll have several rather large warts compared to new languages designed to run on the JVM and use the Java class libraries.
iteration and getting system setting stuff are so generic you might as well implement it yourself or write a thin wrapper (in this case iterating over entries in a hash table and getting the OS name)
IMO, a good chunk of the java libraries are there to overcome java deficiencies, and don't produce anything grand on their own for other languages.
I'm looking at LLVM at the moment, and I can say that it is far from a JVM/.net .
I wonder if I can invest on it because they will close the gap, or if they are just playing catchup with gcc, in which case there is no future for GC languages.
I don't know too much about LLVM, but the JVM has a ton of advantages: it's pretty much universally available on all platforms, it uses a fairly trivial set of instructions that make learning the instruction set and using it fairly easy, there's a ton of information out there about it covering everything from GC algorithms to VM flags to bytecode instructions and memory models, and both the Sun and IBM versions have been heavily optimized over the years. It might not be the best fit for every language, but it's a pretty impressive platform to build a language on.