On 22.10.2008, at 19:41, Matthias Benkard wrote:

> Personally, I'd define multimethods as the “interface“, in a single
> namespace, and implement them for any set of data structures that I
> wanted to support.

Multimethods were my first idea as well, but I couldn't think of a  
good way to define the dispatch functions. After a second look at  
clojure/zip, I think metadata tags might work well for identifying  
the implementation to be used for specific data items.

> At least, this is the CLOS way, so to speak (CLOS = thommon Lisp
> Object System).  Which, by the way, means that when you say,
>
>> In standard Lisps, everything would be represented by cons nodes,  
>> with
>> little to no abstraction
>
> you're wrong.  Thank God! :)

I have to admit I never got to CLOS. I started my Lisp experience  
with Scheme, but quickly found it too tedious to work with for real- 
life problems. I quickly looked at Common Lisp, but found it way too  
big and complicated for my taste. That's why I like Clojure; it seems  
to have found a good compromise between simplicity and expressiveness.


On 22.10.2008, at 20:16, mb wrote:

> Ok stupid example (don't think to much about the sense, just for
> demonstration): you use a message digest to identify things.
...

Thanks for the example, that does indeed look like a good solution  
for many situations.

> I'm not sure about the numbers but for ISeq (and other interfaces)
> one can use proxy.

Thanks for another nice example. And thanks to everyone who provided  
examples, on this list, on the Wiki, or elsewhere. Examples are in my  
opinion the best way to get an idea of how a language works.

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
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/clojure?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to