Re: Auto generated methods (was Re:The S29 Functions Project)

2005-03-15 Thread Rod Adams
Leopold Toetsch wrote: No. The above "lowlevel" C isn't aware of C nor of C<$_> and nothing is autogenerated in Parrot. The C is something like: class __parrot_core::Float { multi sub cos(Float x) returns Float ... } This is presumably inherited by C (the Parrot PMC) and bound to: multi sub *

Re: Auto generated methods (was Re:The S29 Functions Project)

2005-03-15 Thread Leopold Toetsch
Rod Adams <[EMAIL PROTECTED]> wrote: > Leopold Toetsch wrote: >>the method call in PIR can be written as: >> >> d = x."cos"() # normal method call >> d = Float."cos"(x) # class method, argument shifted down >> d = P6Num."cos"(x) # same >> d = cos x # PIR opcode s

Re: Auto generated methods (was Re:The S29 Functions Project)

2005-03-14 Thread Rod Adams
Leopold Toetsch wrote: Rod Adams <[EMAIL PROTECTED]> wrote: While that's a nice feature to have in general, I feel better about going ahead and predefining that the builtins are already members of Num, Str, Array, Hash for the shear performance and documentation values of it. That's exactly

Re: Auto generated methods (was Re:The S29 Functions Project)

2005-03-14 Thread Leopold Toetsch
Rod Adams <[EMAIL PROTECTED]> wrote: > While that's a nice feature to have in general, I feel better about > going ahead and predefining that the builtins are already members of > Num, Str, Array, Hash for the shear performance and documentation values > of it. That's exactly the plan, when it co

Auto generated methods (was Re:The S29 Functions Project)

2005-03-13 Thread Rod Adams
Larry Wall wrote: On Sun, Mar 13, 2005 at 01:15:52AM -0600, Rod Adams wrote: : =item multi sub cos (?Num) returns Num : : =item multi method Num::cos () returns Num It would be nice if we could just say the first implies the second. I guess what that effectively means is that even if you take the