3 ms·
Isn't part of the reason for targeting the JVM the ton of libraries you get for free?
by gps408 18y ago
Isn't part of the reason for targeting the JVM the ton of libraries you get for free?
- ori_b 18y agoHow many of them fit idiomatically into the language you choose to use on the JVM?
- jwinter 18y agoClojure 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"))
- mahmud 18y agoiteration 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.
- ori_b 18y agoSo, 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.