Re: Capture Literals

2006-09-24 Thread Austin Hastings

Jonathan Lang wrote:


What got me thinking about this was that I couldn't find decent
documentation about Capture literals in the synopses.

Are Capture literals going to replace or unify the "assuming"/"currying" 
behaviors?


=Austin



Re: Motivation for /+/ set Array not Match?

2006-09-24 Thread Audrey Tang


在 Sep 22, 2006 10:36 PM 時,Patrick R. Michaud 寫到:


Out of curiosity, why not:

/ bar bar $:=(+)/

and then one can easily look at $.from and $.to, as well
as get to the arrayed elements?  (There are other possibilities as
well.)

I'm not arguing in favor of or against the proposal, just pointing
out that there are ways in the existing scheme to get at what is
wanted.


Indeed... Though what I'm wondering is, is there a hidden implementation
cost or design cost of making /+/ always behave such that  
$.from

returns something, compared to the current treatment with the workaround
you suggested?

Thanks,
Audrey




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

2006-09-24 Thread audreyt
Author: audreyt
Date: Sun Sep 24 06:12:58 2006
New Revision: 12348

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

Log:
* S06: Squash two remaining "*f" into "|(f)".

Modified: doc/trunk/design/syn/S06.pod
==
--- doc/trunk/design/syn/S06.pod(original)
+++ doc/trunk/design/syn/S06.podSun Sep 24 06:12:58 2006
@@ -13,9 +13,9 @@
 
   Maintainer: Larry Wall <[EMAIL PROTECTED]>
   Date: 21 Mar 2003
-  Last Modified: 22 Sept 2006
+  Last Modified: 24 Sept 2006
   Number: 6
-  Version: 57
+  Version: 58
 
 
 This document summarizes Apocalypse 6, which covers subroutines and the
@@ -1891,11 +1891,11 @@
 responds to the left-hand C in a binding.  This allows named return
 values if the caller expects one:
 
-sub f { return :x<1> }
+sub f () { return :x<1> }
 sub g ($x) { print $x }
 
-my $x := *f();  # binds 1 to $x, via a named argument
-g(*f());# prints 1, via a named argument
+my $x := |(f);  # binds 1 to $x, via a named argument
+g(|(f));# prints 1, via a named argument
 
 To return a literal C object, always put it in an additional set of
 parentheses: