Re: A6: multi promotion

2003-03-15 Thread Dan Sugalski
At 8:16 AM -0800 3/15/03, Larry Wall wrote: On Sat, Mar 15, 2003 at 11:27:03AM +, Nicholas Clark wrote: : I think that it would be nice to be able to chain yourself in there, rather : than having to replace. : : In perl5 there are some things you have to override, rather than adding to. : Offha

Re: A6: multi promotion

2003-03-15 Thread Larry Wall
On Sat, Mar 15, 2003 at 11:27:03AM +, Nicholas Clark wrote: : I think that it would be nice to be able to chain yourself in there, rather : than having to replace. : : In perl5 there are some things you have to override, rather than adding to. : Offhand I can't see a practical way that the opc

Re: A6: multi promotion

2003-03-15 Thread Nicholas Clark
On Thu, Mar 13, 2003 at 12:02:22AM +, Piers Cawley wrote: > Damian Conway <[EMAIL PROTECTED]> writes: > > We didn't include it in A6 but our current notions (i.e. this week ;-) > > about interactions between subs, methods, and multimethods are > > something like this: > > > >

Re: A6: multi promotion

2003-03-12 Thread Piers Cawley
Damian Conway <[EMAIL PROTECTED]> writes: > Richard Proctor asked: > > > If one has a simple sub such as factorial: > > > > sub factorial(int $a) {...} > > > > then one subsequently declares the multi form of factorial to pick up the > > non-integer form: > > > > multi factorial(num $a) {.

Re: A6: multi promotion

2003-03-12 Thread Larry Wall
On Tue, Mar 11, 2003 at 06:08:59PM -0800, Michael Lazzaro wrote: : : On Tuesday, March 11, 2003, at 12:39 PM, Austin Hastings wrote: : >You want C to tell the compiler to build in multiple dispatch. : >Any invocation of C after C is going to be a penny : >dropped into the great Pachinko game of m

Re: A6: multi promotion

2003-03-11 Thread Richard Proctor
On Wed 12 Mar, Michael Lazzaro wrote: > > On Tuesday, March 11, 2003, at 12:39 PM, Austin Hastings wrote: > > You want C to tell the compiler to build in multiple dispatch. > > Any invocation of C after C is going to be a penny > > dropped into the great Pachinko game of multimethod-dispatchery.

Re: A6: multi promotion

2003-03-11 Thread Michael Lazzaro
On Tuesday, March 11, 2003, at 12:39 PM, Austin Hastings wrote: You want C to tell the compiler to build in multiple dispatch. Any invocation of C after C is going to be a penny dropped into the great Pachinko game of multimethod-dispatchery. By default, if no winning multi appears, the call falls

Re: A6: multi promotion

2003-03-11 Thread Damian Conway
Richard Proctor asked: > If one has a simple sub such as factorial: > > sub factorial(int $a) {...} > > then one subsequently declares the multi form of factorial to pick up the > non-integer form: > > multi factorial(num $a) {...} > > Does this promote the original declaration of factorial to a m

Re: A6: multi promotion

2003-03-11 Thread Austin Hastings
--- Michael Lazzaro <[EMAIL PROTECTED]> wrote: > > On Tuesday, March 11, 2003, at 11:19 AM, Austin Hastings wrote: > > But you can't wrap multi-ness, as far as I can tell. > > > > [A6] > > And it happens that the multimethod dispatch is smart enough to > find > > the ordinary single-invocant sys

Re: A6: multi promotion

2003-03-11 Thread Michael Lazzaro
On Tuesday, March 11, 2003, at 11:19 AM, Austin Hastings wrote: But you can't wrap multi-ness, as far as I can tell. [A6] And it happens that the multimethod dispatch is smart enough to find the ordinary single-invocant sysread method, even though it may not have been explicitly declared a multim

Re: A6: multi promotion

2003-03-11 Thread Austin Hastings
--- Michael Lazzaro <[EMAIL PROTECTED]> wrote: > On Tuesday, March 11, 2003, at 06:42 AM, Richard Proctor wrote: > > If one has a simple sub such as factorial: > > > > sub factorial(int $a) {...} > > > > then one subsequently declares the multi form of factorial to pick > up > > the > > non-inte

Re: A6: multi promotion

2003-03-11 Thread Michael Lazzaro
On Tuesday, March 11, 2003, at 06:42 AM, Richard Proctor wrote: If one has a simple sub such as factorial: sub factorial(int $a) {...} then one subsequently declares the multi form of factorial to pick up the non-integer form: multi factorial(num $a) {...} Does this promote the original decla

A6: multi promotion

2003-03-11 Thread Richard Proctor
If one has a simple sub such as factorial: sub factorial(int $a) {...} then one subsequently declares the multi form of factorial to pick up the non-integer form: multi factorial(num $a) {...} Does this promote the original declaration of factorial to a multi? if not what happens? Richard -