This came up on perl6-internals, and Dan liked the try suggestion and
suggested That I post it here for comments. I'm not subscribed to
p6-language, so you'll need to include me in any replies where you want a
response from me.
=
Dave
Wizard [EMAIL PROTECTED] writes:
This came up on perl6-internals, and Dan liked the try suggestion and
suggested That I post it here for comments. I'm not subscribed to
p6-language, so you'll need to include me in any replies where you want a
response from me.
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
: 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 (which is actually '3' after reducing) get promoted to Complex,
: or does the result from the division
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