On Mon, Feb 15, 2010 at 3:56 AM, Konrad Hinsen
<konrad.hin...@fastmail.net> wrote:
> On 14.02.2010, at 22:48, Mark Engelberg wrote:
>
>> 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,
>
> I agree. The current deftype is meant to be both the primitive construct for 
> implementing data types, and a high-performance substitute for defstruct. It 
> would be conceptually cleaner to separate these two roles.
>
>> 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?
>
> I don't remember. The issue of default implementations comes up now and then, 
> but only in the form of the question "is it possible?".
>
> In my own applications, I have only used deftype as a primitive construct, 
> not as a substitute for defstruct. The special status of IPersistentMap thus 
> never bothered me. However, I do see other cases where default 
> implementations would be useful to have. And then IPersistentMap could become 
> just one of them.
>

I just wanted to chime in and say I agree - I am not totally happy
with how getting the map/default implementation works, and think that
possibly the two roles deftype/defstruct-replacement should be more
distinct. So, I'm working on it.

Rich

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