On Tue, 17 Nov 2009, pugs-comm...@feather.perl6.nl wrote:
> +++ docs/Perl6/Spec/S02-bits.pod      2009-11-17 18:37:41 UTC (rev 29113)
> @@ -2735,10 +2735,11 @@
>
>  =item *
>
> -Complex literals are similarly indicated by writing an addition of
> +Complex literals are similarly indicated by writing an addition or 
> subtraction of
>  two real numbers without spaces:
>
>      5.2+1e42i
> +    3-1i
>
>  As with rational literals, constant folding would produce the same
>  complex number, but this form parses as a single term, ignoring


What happens then to negation of a literal?

 -5-2i
or even
 - 5-2i

Unless that's also a single term, you'd wind up negating the -2i back to
+2i, which is almost certainly not what's wanted.

Perhaps we could just stick to the "+" form, and add a prefix conjugation
operator? Some possible spellings include:
        conj
        ⎺       high bar (reminiscent of the mathematical over-bar notation)
        ⌇       verticle squiggly line
        ⇅       up-and-down arrow (since it inverts imaginary but not real 
parts)

-Martin

Reply via email to