Dan Sugalski <[EMAIL PROTECTED]> writes:
>
>I've been considering adding all the 'basic' operations (simple math,
>repetition, maybe comparisons) into the base vtable. That'd mean that,
>while the core perl might have *no* idea what to do with:
>
>  @foo = @bar * 12;
>
>the slots would be there in case the clever PDL folks want to define it.

I like it. 

The problem is (as with overloading) is deciding which 
operand's vtable gets to do the op and "who" is responsible for upgrading 
the "lesser" operand.


>Or any clever folks, I suppose. I have no idea what multiplication in list
>(or would it be array? Probably actually array context, though we don't
>have that at the moment) context does, but someone else might.

It is pretty obvious what above should do:

@foo = ();
foreach my $elem (@bar)
 {
  push(@foo,$elem * 12);
 } 

-- 
Nick Ing-Simmons <[EMAIL PROTECTED]>
Via, but not speaking for: Texas Instruments Ltd.

Reply via email to