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

2006-04-16 Thread Dr.Ruud
[EMAIL PROTECTED] schreef:

 +The unary prefix operator C* casts a value to an CCapture

  s/\ban\b/a


 @@ -1340,7 +1340,7 @@
  PairTuple of two elements that serves as an one-element

  idem


 +my $ref = [EMAIL PROTECTED]; # $ref is an Capture object - see S02

  idem


-- 
Affijn, Ruud

Gewoon is een tijger.


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

2006-04-15 Thread autrijus
Author: autrijus
Date: Sat Apr 15 06:17:49 2006
New Revision: 8698

Modified:
   doc/trunk/design/syn/S02.pod
   doc/trunk/design/syn/S03.pod
   doc/trunk/design/syn/S06.pod
   doc/trunk/design/syn/S09.pod

Log:
* Synopses: Change Arguments to Capture to avoid using a
  plural word as a class name.  (Also it makes it easier later
  to say that Match is a subclass of Capture.)

Modified: doc/trunk/design/syn/S02.pod
==
--- doc/trunk/design/syn/S02.pod(original)
+++ doc/trunk/design/syn/S02.podSat Apr 15 06:17:49 2006
@@ -525,35 +525,33 @@
 
 =item *
 
-An argument list object (CArguments) may be created with backslashed parens:
+An argument list object (CCapture) may be created with backslashed parens:
 
 $args = \(1,2,3,:miceblind)
 
-Values in CArguments values are parsed as ordinary expressions, marked as
-positional, named, to-be-flattened, and so on.
+Values in CCapture are parsed as ordinary expressions, marked as invocant,
+positional, named, and so on.
 
-Like CList objects, CArguments are immutable in the abstract, but
-evaluates its arguments lazily.  Before everything inside a CArguments are
+Like CList objects, CCapture objects are immutable in the abstract, but
+evaluates its arguments lazily.  Before everything inside a CCapture are
 fully evaluated (which happens at compile time when all the arguments are
 constants), the eventual value may well be unknown.  All we know is that is
 that we have the promise to make the bits of it immutable as they become known.
 
-CArguments objects may contain multiple unresolved iterators such as pipes
+CCapture objects may contain multiple unresolved iterators such as pipes
 or slices.  How these are resolved depends on what they are eventually
 bound to.  Some bindings are sensitive to multiple dimensions while
 others are not.
 
-You may cast CArguments to other types with a prefix sigil operator:
+You may retrieve parts from a CCapture object with a prefix sigil operator:
 
 $args = \3; # same as $args = \(3)
 $$args; # same as $args as Scalar or Scalar($args)
 @$args; # same as '$args as Array  or Array($args)
 %$args; # same as '$args as Hash   or Hash($args)
-$args; # same as '$args as Code   or Code($args)
 
 When cast into an array, you can access all the positional arguments; into a
-hash, all named arguments; into a scalar, the invocant; into code, its slurpy
-nameless block.
+hash, all named arguments; into a scalar, its invocant.
 
 All prefix sigil operators accept one positional argument, evaluated in
 scalar context as a rvalue.  They can interpolate in strings if called with

Modified: doc/trunk/design/syn/S03.pod
==
--- doc/trunk/design/syn/S03.pod(original)
+++ doc/trunk/design/syn/S03.podSat Apr 15 06:17:49 2006
@@ -61,7 +61,7 @@
 =item * The backslash operator captures its arguments, and returns an
 object representing those arguments.  You can Idereference this object
 in several ways to retrieve different parts of the arguments; see the
-definition of CArguments S02 for details.
+definition of CCapture in S02 for details.
 
 =item * The old scalar C.. flipflop operator is now done with
 Cff operator.  (C.. now always produces a Range object
@@ -456,7 +456,7 @@
 
 as is this:
 
-my $args = \(@foo, @bar);# construct Arguments object
+my $args = \(@foo, @bar);# construct a Capture object
 push *$args;
 
 In list context, a Scalar holding an Array object does not flatten.  Hence

Modified: doc/trunk/design/syn/S06.pod
==
--- doc/trunk/design/syn/S06.pod(original)
+++ doc/trunk/design/syn/S06.podSat Apr 15 06:17:49 2006
@@ -403,7 +403,7 @@
 pairs instead of values.)
 
 Pair constructors are recognized syntactically at the call level and
-put into the named slot of the CArguments structure.  Hence they may be
+put into the named slot of the CCapture structure.  Hence they may be
 bound to positionals only by name, not as ordinary positional CPair
 objects.  Leftover named arguments can be slurped into a slurpy hash.
 
@@ -579,7 +579,7 @@
 so that you can use more descriptive internal parameter names without
 imposing inconveniently long external labels on named arguments.
 
-Arguments that correspond to named parameters are evaluated in scalar
+Capture that correspond to named parameters are evaluated in scalar
 context. They can only be passed by name, so it doesn't matter what
 order you pass them in, so long as they don't intermingle with any
 positional arguments:
@@ -681,13 +681,13 @@
 
 =head2 Argument list binding
 
-The underlying CArguments object may be bound to a single scalar
+The underlying CCapture object may be bound to a single scalar
 parameter marked with a C\.
 
 sub 

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

2006-04-15 Thread Zohar Kelrich

Some grammar nits I'd like to pick...

Alarmingly, the Capture semantics are starting to make perfect sense  
to me now..


On Apr 15, 2006, at 16:17, [EMAIL PROTECTED] wrote:


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


--- doc/trunk/design/syn/S02.pod(original)
+++ doc/trunk/design/syn/S02.podSat Apr 15 06:17:49 2006

+Like CList objects, CCapture objects are immutable in the  
abstract, but
+evaluates its arguments lazily.  Before everything inside a  
CCapture are
 fully evaluated (which happens at compile time when all the  
arguments are
 constants), the eventual value may well be unknown.  All we know  
is that is
 that we have the promise to make the bits of it immutable as they  
become known.


Tense disagreements:
  capture objects ... evaluates its arguments
  Before everything ... are fully evaluated
is that repeated twice


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


--- doc/trunk/design/syn/S06.pod(original)
+++ doc/trunk/design/syn/S06.podSat Apr 15 06:17:49 2006



-Arguments that correspond to named parameters are evaluated in scalar
+Capture that correspond to named parameters are evaluated in scalar
 context. They can only be passed by name, so it doesn't matter what

I think that was arguments the word, not CArguments the object.