On 15 Nov, 16:58, Konrad Hinsen <googlegro...@khinsen.fastmail.net>
wrote:
> On 15 Nov, 2011, at 15:46 , Doug South wrote:
>
> > I know a little CL and even less of Clojure, but wouldn't Clojure in CL be 
> > fairly trivial? Just a DSL in CL?
>
> All of Clojure's persistent data structures would have to be implemented in 
> CL. Plus multimethods, protocols, and deftype, which are a bit different from 
> their closest equivalents in CL.

For some of the data structures, it might be possible to leverage the
FSet library by Scott Burson, which provides persistent seqs, sets,
and maps.
The closest way to multimethods requires hacking the CLOS
implementation, but in my opinion it's not hard to do (I know I'll
write a blog post someday about my thoughts on this...), though
maintaining all the caches that are in effect for class-based dispatch
is not feasible in general for other types of dispatch. Certainly,
though, this would step out of portable Common Lisp. The alternative
is to effectively reimplement a part of CLOS in an incompatible way...
Protocols and deftype I do not know... also there's the issue of
arithmetic in 1.3+ which has different semantics than CL, different
calling conventions... it would be more than just a DSL over CL, I
fear.

Alessio

-- 
You received this message because you are subscribed to the Google
Groups "Clojure" group.
To post to this group, send email to clojure@googlegroups.com
Note that posts from new members are moderated - please be patient with your 
first post.
To unsubscribe from this group, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en

Reply via email to