[r6rs-discuss] On Clojure

Patrick Logan patrickdlogan at gmail.com
Wed Dec 2 12:44:19 EST 2009


I know clojure a little - I use it more than other lisps now.

The main lesson from clojure is to make concurrency primary, and
emphasize functional programming (minimize mutability, etc.).

Clojure does that mainly two ways...

(1) a good set of "persistent" data structures (sequences, maps, sets)
rather than "in-place" updates to data structures.

(2) a few concurrency-coordination mechanisms - clojure has a
"software transactional memory" with a small set of mechanisms for
updating shared state transactionally...

(a) "refs" - shared, mutable "boxes" where one or more can be updated
together in a transaction.

(b) "atoms" - a shared, mutable "box" that is updated synchronously,
kind of like a "test-and-set".

(c) "agents" - like an "atom" but the update takes place
asynchronously from a thread pool.

There are related interesting details, most data structures are lazy, etc.



On Wed, Dec 2, 2009 at 9:25 AM, Antonio Vieiro <antonio.vieiro at gmail.com> wrote:
> Stumbled upon this at lambda-the-ultimate:
>
> http://lambda-the-ultimate.org/node/3700
>
> Tim Bray (of XML fame) claims Clojure it's the best Lisp ever.
>
> I wonder if we could learn something from Clojure and incorporate in into
> R7RS, namely concurrency constructions.
>
> Maybe some one knows Clojure in depth (I don't) and wants to share some
> ideas here?
>
> Thanks,
> Antonio
>
> _______________________________________________
> r6rs-discuss mailing list
> r6rs-discuss at lists.r6rs.org
> http://lists.r6rs.org/cgi-bin/mailman/listinfo/r6rs-discuss
>
>



More information about the r6rs-discuss mailing list