On Mon, May 21, 2012 at 4:23 PM, kovas boguta <kovas.bog...@gmail.com>wrote:

> On Mon, May 21, 2012 at 6:08 PM, Mark Engelberg
> <mark.engelb...@gmail.com> wrote:
>
> > I never said I want inheritance.  I want convenient reuse of partial
> > implementations.  Inheritance is one way to achieve it, but I'd like to
> > think that Clojure can find a better way.
>
> We also have macros.
>
> You can always make your own
>
> (defmytype TypeName ...)
>
> and make compile to a  deftype that rolls in the protocol
> implementations you want to reuse.
>
>
Yes, I can make a macro, but that won't do any good in terms of my reusing
other people's code that have not been written in this manner.  If large
bodies of code are written implementing protocols using the mechanism
provided by defrecord, and then I can't conveniently reuse that
implementation without seeing it and copying and pasting it, I still have a
problem, macro or not.

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