On Nov 13, 3:42 pm, Laurent PETIT <laurent.pe...@gmail.com> wrote:
> > Very simple example here:http://paste.lisp.org/display/90329
>
> Why not have used add/sub/... instead of +/-/... in the extension of
> Arithmetic for ::Complex ? :-p

Just a little simpler, that's all.

> This example has maybe a problem : doesn't the symmetry of these
> Arithmetic operators seems to be crying for type multiple dispatch in
> this particular case ? :-)

Yes, in the general case, arithmetic requires multimethods.  But
multimethods -- or any dynamic type dispatch -- are too slow for math-
heavy code anyway.  So, for that reason, it's not a great example.
But it was the first thing I thought of.

-SS

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