6 ms·
And a strong sell for Scala and no mention of Clojure. It confuses the hell out of me; clojure is fast, mature, and has a OO syntax and model to rival CLOS. It'
by KirinDave 16y ago
And a strong sell for Scala and no mention of Clojure. It confuses the hell out of me; clojure is fast, mature, and has a OO syntax and model to rival CLOS. It's got built in laziness and te best concurrency primitives I've seen to date (and I was a professional Erlang programmer).
What does it take to break into the general public's consciousness? Clearly it's not the parens.
- dpritchett 16y agoScala has Twitter to champion it in business and tech circles as well as creator Odersky's technical university affiliations to appeal to the academic crowd. Clojure has a lot going for it in terms of theory but I don't know that it can claim any of the social proof of Scala. The closest thing I can think of for Clojure is all of Siebel's Lispy interview questions from Coders at Work that lead an underinformed coder to think highly of STM and of Lisps. Edit: Scala apparently predates Clojure by a good four years. The larger mindshare is no surprise in that light. Also it appears to have simple pattern matching and several other things that Alex Payne liked: http://www.slideshare.net/al3x/why-scala-presentation http://www.slideshare.net/al3x/why-scala-presentation
- xtho 16y agoAFAIK the "theory" in clojure also stems from the scala world in that clojure data structures are based on work done for scala or by scala affiliates.
- KirinDave 16y agoNo. All that work predates both, in some cases by several years. In fact, a good friend of mine is working to put scala bindings over all the clojure data structures so they can be used transparently in scala. They're that good.
- Artemidoros 16y agoYour friend might be wasting a lot of effort (apart from his personal learning experience), as Phil Bagwell is working on Scala's collection library.
- arohner 16y agoFor context to "outsiders": Bagwell wrote the papers that the Clojure datastructures are based on.
- KirinDave 16y ago“A lot of effort?” Wrapping the PersistentMaps took like less than 200 lines of code: http://github.com/codahale/yoink http://github.com/codahale/yoink
- Artemidoros 16y agoYes, 'a lot' is quite relative. :-) From my point of view 200 LoC giving me something I already have is a lot. From the point of view of your friend 200 LoC might be a very small price to pay for a good learning experience.
- KirinDave 16y agoThe back of your hand is going to get sore with all those compliments.
- Artemidoros 16y agoI did not have the intention of backhanding you or your friend. If my post had the appearance of doing so, I apologize. I just wanted to point out the (for me at least) non obvious fact that the mind behind the theory of Clojure's persistent datastructures is working on Scala's collection library and that Scala's hash maps are already backed by hash tries - http://www.scala-lang.org/archives/downloads/distrib/files/nightly/docs/library/scala/collection/immutable/HashMap.html http://www.scala-lang.org/archives/downloads/distrib/files/n...
- francoisdevlin 16y ago<contributor-bias> I seriously think Clojure is too much to take in at the first introduction. It's really hard to get your brain around everything done right, when compared to traditional programming. You need to use it for a while to really get why it's approach to state (not concurrency) is awesome. </contributor-bias>
- KirinDave 16y agoI think that this may be a side-effect of the literature, which is very lispy and computer sciency. For someone like me, that's exactly the right tack. For someone who may not take for granted all the claims Rich and his book-writing compatriots are making (let alone take for granted the lisp code-as-data is an foundational revelation of computer science), it may be a problem. Because really, Clojure is in many ways simpler than both Scala and Java. You can ignore the hard parts (agents, deftype, macros, de-chunking seqs, etc) and just cruise through the easy parts with a fair degree of ease. Everyone understands functions, after all. And Javascript has really pushed the "use functions for everything" approach into the public eye quite nicely.
- francoisdevlin 16y agoThat, and we're still getting our act together in the Clojure world. Stay tuned :)
- jacquesm 16y agoI keep asking for, and I will do so again here, a non-toy web application written in clojure as a study object for newbies to dissect. That would help a lot.
- swannodette 16y agoWhat would qualify as non-toy? With Ring and a routing library like Moustache what more do you really need for building a non-trivial web application in Clojure?
- 16y ago
- mbrubeck 16y agoThis article is from December 2008, when both languages were fairly young but Scala had been around significantly longer than Clojure.
- KirinDave 16y agoGood point. I hadn't noticed that.
- foldr 16y agoI liked the look of Clojure the language, but I got put off a bit by all the Java infrastructure that gets pulled in. For example, not knowing much about Java build tools, I have very little idea what leinigen is actually doing behind the scenes. There's not much documentation, and I didn't have much luck googling for error messages. I'm playing around a bit with Google App Engine, and things got a lot easier when I just gave up and switched over to Python. Having to use any kind of build system feels like a huge waste of time if execution speed is not a top priority. Python might not be quite as nice a language as Clojure, but I just write the code and it works -- no extra fiddling about required.
- mark_l_watson 16y agoI think that you are correct about two things: Clojure stack traces and error messages are pretty bad. And, Python is probably the best language for AppEngine because of the small loading request times; with Java I struggle to minimize loading request times (I use objectify-appengine instead of JDO, etc.)
- mark_l_watson 16y agoI agree. I have been working on some statistical NLP code in Clojure today for a client and I continue to be amazed at how concise code can be. One of the reasons I starting using Ruby about 5 years ago was that it is such a concise language, but Clojure seems even better. Smaller code is easier to read and maintain.