Actually, the more I think about it, the more I feel like deftype's
"specify clojure.lang.IPersistentMap as an interface with no
implementation, and you'll get a default implementation" seems like a
weird exception, and I can't help but wonder if there's a more general
way to handle it that would help with some of the other issues that
are typically solved with abstract base classes and mixins.

Has their been any community brainstorming about what the syntax could
look like for a general mechanism to specify within a deftype default
implementations or default partial implementations of various
interfaces?

extend's capability to use maps of keywordized function names to
method implementations is potentially powerful, but I wonder if it
might be nice to also add to these maps metadata which indicates a
list of interfaces/protocols known to be implemented (or partially
implemented) by the methods in that map.  This might allow for a
syntax within deftype where after defining the fields of the type, you
can specify a bunch of these "mixin maps", and it can use the metadata
to automaticaly categorize them into the appropriate interface
implementation.

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