Re: r29113 - docs/Perl6/Spec

2009-11-17 Thread Martin D Kealey


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


r29113 - docs/Perl6/Spec

2009-11-17 Thread pugs-commits
Author: lwall
Date: 2009-11-17 19:37:41 +0100 (Tue, 17 Nov 2009)
New Revision: 29113

Modified:
   docs/Perl6/Spec/S02-bits.pod
Log:
[S02] more clarifications from TheDamian++


Modified: docs/Perl6/Spec/S02-bits.pod
===
--- docs/Perl6/Spec/S02-bits.pod2009-11-17 18:22:58 UTC (rev 29112)
+++ docs/Perl6/Spec/S02-bits.pod2009-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
@@ -2870,6 +2871,7 @@
 a => $a :$a
 a => @a :@a
 a => %a :%a
+a => &a :&a
 a => $$a:$$a
 a => @$$a   :@$$a (etc.)
 a => %foo%foo:p
@@ -3500,10 +3502,10 @@
 foo:#   label   -- must be label at statement boundary.
 -- ILLEGAL otherwise
 foo: bar:   #   two labels in a row, okay
-.foo:   # $_.foo: 1 -- must be "dot" method with : args
+.foo: 1 # $_.foo: 1 -- must be "dot" method with : args
 .foo(1) # $_.foo(1) -- must be "dot" method with () args
 .foo# $_.foo()  -- must be "dot" method with no args
-.$foo:  # $_.$foo: 1-- indirect "dot" method with : args
+.$foo: 1# $_.$foo: 1-- indirect "dot" method with : args
 foo bar: 1  # bar.foo(1)-- bar must be predecl as class
 -- sub bar allowed here only if 0-ary
 -- otherwise you must say (bar):
@@ -3586,6 +3588,8 @@
 __END__ =begin END
 __DATA__=begin DATA
 
+[Note: this paragraph is speculative and subject to drastic change
+as S26 evolves.]
 The C<=begin END> Pod stream is special in that it assumes there's
 no corresponding C<=end END> before end of file.  The C
 stream is no longer special--any Pod stream in the current file