At 7:16 AM -0800 2/13/02, Wizard wrote:
>  > my Complex $c = 3+4i;
>>  my $plain = 1.1;
>>  $plain = $c;
>
>This might be even more "Complex" than that - what if Complex can be
>reduced? Should it? for instance:
>
>my Complex $c = 3+4i;
>my Complex $d = 4i;
>my $plain = $c / $d;
>
>Does $plain get promoted, or does the result from the division get demoted?

Since $plain's not a fixed scalar type, it should be whatever the 
division of $c and $d produces, presumably a complex number.

>Should parrot bother to even check, or should it just promote automatically
>and let the implementation decide? I think promotion would be best and
>fastest for all circumstances.

I prefer letting the destination decide, with automatic type changing 
as the default. Given the potentially large number of variable types 
that can be created, I can't picture a workable hierarchy that won't 
be restrictive here.

>Perhaps there could be a sort of 'try' for
>conversion that returns the best possible result?

That's an interesting idea. I kind of like it--float it past Larry 
and p6-language and see what happens.
-- 
                                         Dan

--------------------------------------"it's like this"-------------------
Dan Sugalski                          even samurai
[EMAIL PROTECTED]                         have teddy bears and even
                                       teddy bears get drunk

Reply via email to