Multiple Return Values - details fleshed out

2008-08-09 Thread John M. Dlugosz
I wrote http://www.dlugosz.com/Perl6/web/return.html to clarify and extrapolate from what is written in the Synopses. --John

Quick questions on classes re S12

2008-08-09 Thread John M. Dlugosz
1) How do you declare a private method? I see how you call one, but not how to define one. 1b) Is the intent that $!foo without an explicit invocant refers to self, as opposed to $.bar or .bar which refers to $_ ? 2) re: has $brain; # also declares $!brain; Does that mean that $brain by

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

2008-08-09 Thread Aristotle Pagaltzis
* Larry Wall [EMAIL PROTECTED] [2008-08-08 19:45]: q'foo is now a valid identifier. Qa tlho', Larry. Regards, -- Aristotle Pagaltzis // http://plasmasturm.org/

Re: Quick question: (...) vs [...]

2008-08-09 Thread Audrey Tang
John M. Dlugosz 提到: What is the difference between (1,2,3) and [1,2,3] ? One is a List and one is an Array; you cannot push into a list, but you can into an array. my @a := (1,2,3); my @b := [1,2,3]; @a.push(4); # fails @b.push(4); # works Cheers, Audrey

Re: Multiple Return Values - details fleshed out

2008-08-09 Thread Jon Lang
John M. Dlugosz wrote: I wrote http://www.dlugosz.com/Perl6/web/return.html to clarify and extrapolate from what is written in the Synopses. A few comments: 1. I was under the impression that identifiers couldn't end with - or '. 2. While list context won't work with named return values, hash

Re: Quick questions on classes re S12

2008-08-09 Thread Jonathan Worthington
Hi, Answers as I understand things... John M. Dlugosz wrote: 1) How do you declare a private method? I see how you call one, but not how to define one. my method foo { ... } 1b) Is the intent that $!foo without an explicit invocant refers to self, as opposed to $.bar or .bar which refers

Re: List of captures, why?

2008-08-09 Thread Brandon S. Allbery KF8NH
On 2008 Aug 8, at 23:12, John M. Dlugosz wrote: Brandon S. Allbery KF8NH allbery-at-ece.cmu.edu |Perl 6| wrote: On 2008 Aug 8, at 23:06, John M. Dlugosz wrote: Why is 3;3;3 a list of captures rather than a list of lists? IIRC it has to do with providing enough information for slices and/ or

Re: Quick question: (...) vs [...]

2008-08-09 Thread Patrick R. Michaud
On Fri, Aug 08, 2008 at 11:08:51PM -0400, Brandon S. Allbery KF8NH wrote: On 2008 Aug 8, at 22:53, John M. Dlugosz wrote: What is the difference between (1,2,3) and [1,2,3] ? IIRC one is a list, the other a reference to a list --- which in perl6 will be hidden for the most part. so

Re: Closure vs Hash Parsing

2008-08-09 Thread Patrick R. Michaud
On Fri, Aug 08, 2008 at 07:32:52AM +0200, Carl Mäsak wrote: Jonathan (): That this means the { $_ = uc $_; } above would end up composing a Hash object (unless the semicolon is meant to throw a spanner in the hash-composer works?) It says you can use sub to disambiguate, but %ret = map