> In a related matter, computer languages with Symbolic Mathematics
> capabilities, like Mapple, let you explicitly demand where do 
> you want the operation to take place.
> 
> This could be done naturally in perl6 using the colon meta-operator:
>
> my $plain = $c - $d : Math::Complex   # 3.0 + 0i
> sqrt(2 : Math::Integers)       # -> exception or not-a-number

Not a bad idea,. I beleive that the perl6 adjective operator
(for functions) will be a semicolon, not a colon. I'm not
sure how it is planned to apply it to operators.

Its also plausable to use properties:

my $plain2 is Math::Complex = $c - $d.

That would require overloading the '-' operator based on
return type; and could get a bit nasty.


Dave.

Reply via email to