9 ms·
I'd go with Clojure if you need any of the following: 1. Concurrency 2. The most (largest qty of) available FOSS libs anywhere 3. Speed 4. The ability to exten
by francoisdevlin 16y ago
I'd go with Clojure if you need any of the following:
1. Concurrency
2. The most (largest qty of) available FOSS libs anywhere
3. Speed
4. The ability to extend the language
5. WORA
6. Text/string processing
Python will win in scripting/*NIX integration, though.
Don't really know enough about Node.JS
- icey 16y agoNode is pretty interesting and seems to have pretty good performance, but I wouldn't build anything critical on it until at least version 0.2. As far as I know, there are semi-frequent breaking changes. Ryan Dahl has said that API stability should come with version 0.2.
- caffeine 16y ago"I wouldn't build anything critical on it until at least version 0.2" Ha! It's a brave new world. It used to be you needed a whole version number under your belt before critical stuff could be built..
- andrewvc 16y agoAgreed, node development is going at a breakneck pace, but you should count on your code not working 6 months down the line without at least as few tweaks. BTW, the new Buffer objects are awesome, and provide massive speed increases with binary data.
- rglullis 16y agoI really have a hard time seeing Python losing to Clojure on (2), (5) and (6). What kind of software/library would you find on Clojure but not Python? How is Python not WORA? Where does Python lack in text processing?
- francoisdevlin 16y agoJava & the JVM give me 2 & 5. While Pythons text processing is great, I think functional composition & juxtaposition give Clojure and edge. Plus, strings are simply sequences, so the core language works well with them too.
- KirinDave 16y ago> What kind of software/library would you find on Clojure but not Python? Java has a lot of great libraries for which there are not terrific examples in Python. Clojure gets all of them. > Where does Python lack in text processing? Clojure handles large strings better than Python (unless you start using substrings, in which case an underlying java bug hits you). (oh, and Clojure is not a deliberately and comically crippled language).
- rufugee 16y agoHow is Python deliberately and comically crippled? I'm honestly curious.
- hugoc 16y agoI think he may be refering to the GIL.
- KirinDave 16y agoThat and certain deficiencies spawned by a desire for “simplicity.”
- technomancy 16y agoDon't forget one-line lambdas.
- strlen 16y ago> 2. The most (largest qty of) available FOSS libs anywhere Quick heads up. The ease of FFI (in Clojure's case with Java) is not unique to Clojure and it isn't necessarily a great thing. It's also an issue with Common Lisp: as FFI with C is easy, there's less incentive to develop idiomatic libraries for the language. E.g., Common Lisp lacks a standard modern way to network I/O, but it's largely been ignored as larger users of the language e.g., ITA could always build and standardize upon an internal C-based extension. That being said, Clojure is great for reasons beyond running on the JVM: a unique approach to concurrency, incorporation of ML-family features, first order data structures beyond lists (maps, vectors) and the fact it's a Lisp-1 with a great macro facility. I'd love to see Clojure also go beyond the JVM and onto CLR, Parrot and LLVM. Interestingly enough the other prominent "next generation Lisp", arc, is also a Lisp-1 with true macros (as opposed to Scheme's hygienic macros).
- prospero 16y agoIt's very common to write an idiomatic wrapper for a useful Java library. Your complaint seems to be that those wrappers won't survive the transition onto another platform. I don't really see why that's a problem. Why target another platform if not for its libraries? If Clojure is exactly the same on the JVM as it is on LLVM, why should it ever leave the JVM?
- mahmud 16y agoCommon Lisp lacks a standard modern way to network I/O http://common-lisp.net/project/usocket/ http://common-lisp.net/project/usocket/
- draegtun 16y agoThe most (largest qty of) available FOSS libs anywhere Do you literally mean anywhere or compared to other GAE languages? If so do you have a rough estimate on how many Java/Clojure FOSS libraries/modules/packages there are?