On 23.04.2010, at 19:20, Rich Hickey wrote:

> You can get that back easily by implementing ILookup/IKeywordLookup, as does 
> defrecord. I still have ideas about macro-like mixins for use in deftype, but 
> I concluded the mandatory use of such mixins to create record-like things was 
> too much user effort, and we need more experience with code reuse in deftype 
> to determine need.

That sounds very interesting. I have been playing with various ideas for 
reusing method code in several defttypes, but I am not really happy with any of 
them. Macros are difficult to use because nothing at the toplevel of a deftype 
form is macro-expanded. Syntax-quote is messy because it requires so many 
symbols to be prefixed with ~'. I ended up writing my own little templating 
system but its use is getting messier all the time as well.

Konrad.

-- 
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