2010/12/16 Sunil S Nandihalli <sunil.nandiha...@gmail.com>

> double-dispatch in clojure .. thats neat... Thanks Stuart.


Really, that's "double-dispatch with protocols", 'cause
double-triple-whatever-dispatch on anything you know 'bout the function
arguments is solved since the introduction of multimethods.

Cheers,

-- 
Laurent


> Sunil.
>
>
> On Wed, Dec 15, 2010 at 12:17 AM, Stuart Sierra <
> the.stuart.sie...@gmail.com> wrote:
>
>> On Dec 14, 2:31 am, Konrad Hinsen <konrad.hin...@fastmail.net> wrote:
>> > That's actually what clojure.contrib.complex-numbers already uses! And
>> > it's based on multimethods, not protocols, because of all those binary
>> > operations.
>>
>> It is possible, though not trivial, to do 2-argument dispatch with
>> protocols.  See http://paste.lisp.org/+2023 for an example.  I have no
>> idea how well this performs compared to multimethods.
>>
>> -Stuart Sierra
>>
>> --
>> 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<clojure%2bunsubscr...@googlegroups.com>
>> For more options, visit this group at
>> http://groups.google.com/group/clojure?hl=en
>>
>
>  --
> 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<clojure%2bunsubscr...@googlegroups.com>
> For more options, visit this group at
> http://groups.google.com/group/clojure?hl=en
>

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