On Mon, May 21, 2012 at 1:12 PM, [email protected] <
[email protected]> wrote:

> > Same here--I can count on one hand the number of times I've wanted to
> > implement polymorphism in three and a half years. Every time
> > multimethods have worked great for the task. If you had polymorphism
> > in a tight loop they might not suffice, but the decision to abandon
> > multimethods should only be made after thorough benchmarking.
>
> The point is not whether deftype is useful or not. It is in the
> language so it must be useful, even it it is rarely.
> The point is whether it is an expressive construct or not.
> And it is not expressive enough to my taste.


Why not build a trait system then if you want something more "expressive"?
All the pieces are there. Basic benchmarking of delegation via extend-type
Object on JVM Clojure shows that it's fast enough for many inner loops
where the work is more substantial than arithmetic.

David

-- 
You received this message because you are subscribed to the Google
Groups "Clojure" group.
To post to this group, send email to [email protected]
Note that posts from new members are moderated - please be patient with your 
first post.
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