On 20.04.2009, at 20:00, Timo Mihaljov wrote:

> Is the concept of Abstract Data Types [1] useful in Clojure?

Yes, although the abstraction is necessarily leaky in that you cannot  
enforce it in the absence of static typing.

> If yes, how would you implement one?

Like in any other language: by implementing an API without making any  
promises about the data structure being used. You can find an example  
in clojure.core.zip, which defines a zipper structure without  
exposing the internal representation in its interface.

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 
clojure+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/clojure?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to