Skip to content

Comment on What is Clojure good at?

Comments

'I of course started rambling about how nice it is for concurrent applications, that you can make a map statement run in multiple threads by simply changing “map” to “pmap”.'[sic apparent typos]

While this is sort of true, that is not true concurrency, it is parallelism. It seems that a lot of production Clojure code will end up relying on Java code at a low level. (That was at least my experience in getting things performant).

When you do this, it seems to me that you lose some of the safe parallelism guarantees. Immutable data structures with 'pmap' are great, as long as you didn't use a mutable Java array somewhere... (This is reasonable, you have enough rope to hang yourself). The takeaway is not 'instant concurrency', it simply isn't true. The takeaway 'great built in support for certain types of concurrency' would be better.

I think the 'fourth' point, Lisp is great at syntax abstraction, has always been true, and is a great point to make in favor of any lisp. If you know what you are doing, it is possible to write some extremely pretty, declarative code. (But again, there's no accounting for taste, and you have enough rope to hang yourself).

Lisp: enough rope to hang yourself, or write awesome code. Or (more likely) do both.

AboutSource Built by g1lg1l

Hackerly is an independent reader for Hacker News, built on the public HN API. Not affiliated with Y Combinator.