in reply to Re (tilly) 1: Polymorphic prototypes? (creating new syntax)
in thread Polymorphic prototypes? (creating new syntax)

Have you seen Class::MultiMethods ? That allows for multiple dispatch in Perl.
  • Comment on Re: Re (tilly) 1: Polymorphic prototypes? (creating new syntax)

Replies are listed 'Best First'.
Re (tilly) 3: Polymorphic prototypes? (creating new syntax)
by tilly (Archbishop) on Apr 09, 2001 at 21:12 UTC
    Yes, I have seen it.

    But note that it does not and cannot be readily extended to allow dispatching based on what prototype coercion finally made the code not a syntax error. Which is what was being asked for.

    So it doesn't solve the problem at hand.

    Besides that it is a performance hit, and there is considerable conceptual complexity in the APIs that it makes possible. That complexity makes me personally inclined to avoid it and seek to rethink problems in a simpler way rather than add that complexity to the problem at hand.

    All of which were reasons why I didn't mention it before...