top | item 381506

Clojure could be to Concurrency-Oriented Programming what Java was to OOP

53 points| sharksandwich | 17 years ago |bc.tech.coop | reply

31 comments

order
[+] globalrev|17 years ago|reply
Does anyone else think so? I'm using Clojure a lot and really like it.

But Lisp has been around for 50 years and never hit the mainstream so it seems there perhaps is something about it that doesn't fit with most programmers?

Also it only offers one form of concurrnecy and while I like it there is still much speculation and research in the area. Scala for example kind of builds on the whole Java-language and offers a more recognizable language for Java-developers and more opportunities to roll your own concurrency-mechanisms, or at least that's the impression I've gotten.

And then we have Haskell and Erlang.

[+] mdemare|17 years ago|reply
I think Clojure might succeed even without its great concurrency features - and by succeed I mean gaining a Porsche-like marketshare.

It has all the good Lisp stuff, but ditches all the historical Lisp cruft, actually has a little syntax. And because it runs on the JVM, it's stable, fast, debuggable, has a wealth of libraries and runs on Windows, Mac and Linux.

And there's already a (beta) book: http://pragprog.com/titles/shcloj/programming-clojure

[+] babo|17 years ago|reply
Clojure is clean and lean while Scala is heavy weight. I'm learning them side by side but enjoying Clojure way more, especially the pragmatism of feature decisions.
[+] johnm|17 years ago|reply
Clojure just might become a popular lisp. :-)

In terms of Scala, it's built on top of the JVM (as is Clojure) and so it's underlying model is the same -- Java threads mapped to OS threads. Scala does give people a variety of syntactic constructs.

[+] ken|17 years ago|reply
Is this due to something inherent with Lisp? This argument also works for each aspect of Lisp that's been borrowed by other languages:

  (format t "~{~A has been around for ~D years so it seems there perhaps is something about it that doesn't fit with most programmers?~^ ~}"
          '("Structured programming" 10
            "Lexical scoping" 20
            "GC" 30
            "Closures" 40))
The last increment of power that makes Python into a Lisp seems pretty small in comparison.

Clojure does fix one of the last things holding it back: it removed "Lisp" from the name, and added a trendy "J".

[+] jhancock|17 years ago|reply
This title is horrifying!!! Java set back good OOP by about 20 years!!! We're still recovering from what Java did to the OO community.
[+] dfranke|17 years ago|reply
The damage was done by C++. Java was a step up from there.
[+] markessien|17 years ago|reply
This is quite an accusation, could you please back it up? I assume you use OO also?
[+] smoody|17 years ago|reply
If only we could convince someone to create Projure -- a Prolog-like language that compiles to JVM bytecodes. I'd be the first (and only?) customer.
[+] dfranke|17 years ago|reply
On Lisp shows a Prolog implementation in CL. Port it to Clojure.
[+] queensnake|17 years ago|reply
There's got to be one out there - some Master's student's project if nothing else.
[+] markessien|17 years ago|reply
We can't keep stepping backwards to support changing processor technologies. Concurrency should be abstracted away from the programmer, and handled on a compiler level, irrespective of your programming language.
[+] colgur|17 years ago|reply
I think the fact that we need to step back when processor technology changes shows that we (the software community) lack a truly pervasive concurrent programming model. Does Clojure really offer a truly orthogonal solution to this problem?

And when I say "problem" I'm really talking about the scalability of fine-grained concurrency techniques formalized by Dikjstra (http://en.wikipedia.org/wiki/Semaphore_(programming)).

I agree that programmers will eventually have to be relieved of concerns such as critical section but we will never escape questions like "what are the parallel aspects of this algorithm (or library or application)". A compiler will never "discover" large-scale concurrency patterns in any mainstream language (at least to my reckoning). Maybe interpreted languages will ultimately lead the way.

[+] aaronblohowiak|17 years ago|reply
sure, and you can get a very minor boost. the problem is that the computer can only safely do so much concurrently. if you think otherwise, then go ahead and make a compiler that supports concurrency "irrespective of your programming language" in a way that is sane and performs well.
[+] socksandsandals|17 years ago|reply
Clojure is neat and all, but I can't see it being anything but a proving ground for some more esoteric technologies or methods. Lisp has been around too long to get mainstream acceptance and the "power vaccum" of which PG is fond of mentioning is marginal these days due to Ruby, Python, etc. Clojure has the attractiveness of running people's existing infrastructure (i.e. the JVM) but its nowhere near being alone in that regard. Its neat but don't look for it to be a world-changer.
[+] shoover|17 years ago|reply
I'd be interested to see concurrency baked into Ruby or Python the way it is with Erlang and Clojure. Until then, my eye is on Clojure.