> > Mark-Jason Dominus (via RT) <[EMAIL PROTECTED]> wrote:
> >:The currnt prototype() builtin function returns the prototype of some
> >:other function. For example
> >:
> >: sub bleh ($) { return $_[0] }
> >: print prototype('bleh');
> >:
> >:This prints '$'.
> >:
> >:But there is no convenient way to modify the prototype of an existing
> >:function.
> > [...]
> >:It seems to me that allowing
> >:
> >: prototype(FUNCTION, '$$;$')
> >:
> >:would be straightforward and would not break any old code.
while we're at it we could make prototypes for a function name
refer to a table of functions, to implement prototype-based
multiple dispatch. Possibly with a three-argument form of prototype()
-- David Nicol, independent consultant and contractor
Steve Jobs in 2004