[svn:perl6-synopsis] r8122 - doc/trunk/design/syn

2006-03-12 Thread autrijus
Author: autrijus
Date: Sun Mar 12 05:15:15 2006
New Revision: 8122

Modified:
   doc/trunk/design/syn/S12.pod

Log:
* S12: private methods are no longer .:meth, but !meth.

Modified: doc/trunk/design/syn/S12.pod
==
--- doc/trunk/design/syn/S12.pod(original)
+++ doc/trunk/design/syn/S12.podSun Mar 12 05:15:15 2006
@@ -552,7 +552,7 @@
 @object».*meth(@args)  # calls all methods (0 or more) on each
 @object».+meth(@args)  # calls all methods (1 or more) on each
 @object».=meth(@args)  # calls mutator method on each
-@object».:meth(@args)  # calls private method on each
+@object»!meth(@args)   # calls private method on each
 
 Hyperoperators treat a junction as a scalar value, so saying:
 


[svn:perl6-synopsis] r8123 - doc/trunk/design/syn

2006-03-12 Thread autrijus
Author: autrijus
Date: Sun Mar 12 05:16:44 2006
New Revision: 8123

Modified:
   doc/trunk/design/syn/S06.pod

Log:
* S06: Patch from bsb++ to make macros hygienic by default,
  with TimToady++'s idea for q:code(:COMPILING) to denote
  unhygienicness.

Modified: doc/trunk/design/syn/S06.pod
==
--- doc/trunk/design/syn/S06.pod(original)
+++ doc/trunk/design/syn/S06.podSun Mar 12 05:16:44 2006
@@ -1985,6 +1985,11 @@
 return q:code < say $a + <<< $ast >>> >
 return q:code ( say $a + ((( $ast ))) )
 
+The delimiters don't have to be bracketing quotes, but the following
+is probably to be construed as Bad Style:
+
+return q:code / say $a + /// $ast /// /
+
 (Note to implementors: this must not be implemented by finding
 the final closing delimiter and preprocessing, or we'll violate our
 one-pass parsing rule.  Perl 6 parsing rules are parameterized to know
@@ -1997,12 +2002,7 @@
 inner expression, the inner parser rule is parameterized to know that
 C<}}}> or whatever is its closing delimiter.)
 
-The delimiters don't have to be bracketing quotes, but the following
-is probably to be construed as Bad Style:
-
-return q:code / say $a + /// $ast /// /
-
-Dequoted expressions are inserted appropriately depending on the
+Unquoted expressions are inserted appropriately depending on the
 type of the variable, which may be either a syntax tree or a string.
 (Again, syntax tree is preferred.)  The case is similar to that of a
 macro called from within the quasiquote, insofar as reparsing only
@@ -2020,10 +2020,20 @@
 (Generally, a term expects a following postfix or infix operator,
 and an operator expects a following term or prefix operator.)
 
-A quasiquote is not a block (even if the delimiters are curlies),
-so any declaration of a variable is taken to be part of the block
-surrounding the macro call location.  Add your own {...} if you want
-a block to surround your declarations.
+Quasiquotes default to hygienic lexical scoping, just like closures.
+The visibility of lexical variables is limited to the q:code expression
+by default.  A variable declaration can be made externally visible using 
+the C pseudo-package.  Individual variables can be made visible,
+or all top-level variable declarations can be exposed using the
+C form.
+
+Both examples below will add C<$new_variable> to the lexical scope of
+the macro call:
+
+  q:code {  my $COMPILING::new_variable;   my $private_var; ... }
+  q:code(:COMPILING) { my $new_variable; { my $private_var; ... } }
+
+(Note that C<:COMPILING> has additional effects described in L.) 
 
 =head1 Other matters
 


minor S02 nit

2006-03-12 Thread Douglas Hunter
This patch fixes a minor typo in S02.

-- Douglas Hunter
Index: S02.pod
===
--- S02.pod	(revision 8142)
+++ S02.pod	(working copy)
@@ -498,7 +498,7 @@
 
 Ordinary package-qualified names look like in Perl 5:
 
-$Foo::Bar::baz	# the $baz variable in package Foo::bar
+$Foo::Bar::baz	# the $baz variable in package Foo::Bar
 
 Sometimes it's clearer to keep the sigil with the variable name, so an
 alternate way to write this is:


[svn:perl6-synopsis] r8168 - doc/trunk/design/syn

2006-03-12 Thread luqui
Author: luqui
Date: Sun Mar 12 22:29:06 2006
New Revision: 8168

Modified:
   doc/trunk/design/syn/S02.pod

Log:
Fixed a typo, thanks Douglas Hunter.


Modified: doc/trunk/design/syn/S02.pod
==
--- doc/trunk/design/syn/S02.pod(original)
+++ doc/trunk/design/syn/S02.podSun Mar 12 22:29:06 2006
@@ -12,7 +12,7 @@
 
   Maintainer: Larry Wall <[EMAIL PROTECTED]>
   Date: 10 Aug 2004
-  Last Modified: 25 Feb 2006
+  Last Modified: 12 Mar 2006
   Number: 2
   Version: 17
 
@@ -498,7 +498,7 @@
 
 Ordinary package-qualified names look like in Perl 5:
 
-$Foo::Bar::baz # the $baz variable in package Foo::bar
+$Foo::Bar::baz # the $baz variable in package Foo::Bar
 
 Sometimes it's clearer to keep the sigil with the variable name, so an
 alternate way to write this is: