4 ms·
TCO is possible in JVM but not in Java. Clojure is just Java library and share all Java problems like TCO, Class sizes or inline limits. I no longer believe in
by Chyzwar 10y ago
TCO is possible in JVM but not in Java. Clojure is just Java library and share all Java problems like TCO, Class sizes or inline limits.
I no longer believe in transpiration or hosted languages. Proper language have LLVM backend. Look at Rust, Swift, Crystal, this is future.
- deleted 10y ago[deleted]
- di4na 10y agoOr you use a VM that was build for that cough cough erlang cough cough
- Chyzwar 10y agoBut Clojure and Scala choose to sell theirs souls for Java popularity.
- jeletonskelly 10y agoIs "selling their souls" really what they're doing? When writing a new language shouldn't one consider its adoption by the community to be a key part of its success? The purist would say all that matters is sticking to a core philosophy while the pragmatist is willing to make some concessions for long-term viability and adoption so long as it doesn't completely undermine the purpose of the language. Essentially, don't you think Hickey, after several failed attempts at writing new programming languages, had given quite a bit of thought about what makes a language successful (and useful) before making the decision to make Clojure JVM based? Of course he did; even explaining the factors that went into the decision. That's not "selling your soul", it's a practical decision that comes from a lifetime of experience.
- Chyzwar 10y agoBecause Clojure is not new language it is another Lisp. Language adoption should not be primary driver. Clojure is more Java based than JVM based. This is main issue. It inherits all Java limitations and share problems inherited from Lisp world. https://github.com/clojure/clojure/blob/master/src/jvm/clojure/lang/PersistentVector.java https://github.com/clojure/clojure/blob/master/src/jvm/cloju... By selling soul I mean: 1. Clojure will forever have ugly/broken stacktraces. 2. Inline/Class limits on JVM will not disappear. 3. Half of Clojure libraries are just wrappers. 4. Lack of TCO and other recursions optimisation. 5. Performance will be always worse than Java 6. Type system with garbage in -> garbage out approach
- pron 10y agoRust is a systems programming language. What makes Swift and Crystal more "proper" than JVM languages?
- Chyzwar 10y agoLLVM is "proper" back-end for code generation that produce native executable optimized for any platform. JVM execute bytecode in Java Virtual Machine. JVM abstract your hardware and have specific runtime that needs to be present. LLVM is superior model because its avoid additional compilation and can in theory provide much better performance.
- grzm 10y agoYou express very strong opinions about Clojure and the JVM in particular, in comparison to the LLVM. Would you mind sharing some particulars of your experience with the two and what domain you work in?
- pron 10y agoActually, the JVM can in theory provide much better performance, because code is specialized as it runs. Statically compiled code must be produced to handle the worst-case usage. As for the runtime being present, it's more of a packaging issue. A language like Go has a runtime that's similar to Java's (except it doesn't JIT-compile), but it is statically linked with your binary. This can be done in Java, too. I must say that it doesn't seem like you're very knowledgeable when it comes to compilation techniques. LLVM and the JVM do make different tradeoffs, but they're not at all the ones you describe.
- paulddraper 10y ago> JVM can in theory provide much better performance, because code is specialized as it runs. Only better if you don't include the runtime compiling (start-up time).
- pron 10y ago