r24784 - docs/Perl6/Spec

2009-01-06 Thread pugs-commits
Author: moritz Date: 2009-01-06 11:14:50 +0100 (Tue, 06 Jan 2009) New Revision: 24784 Modified: docs/Perl6/Spec/S29-functions.pod Log: [S29] typos, thinkos and wording improvements, Brandon++, Tim++ Modified: docs/Perl6/Spec/S29-functions.pod

Re: returning one or several values from a routine

2009-01-06 Thread Daniel Ruoso
Em Seg, 2009-01-05 às 20:32 +0100, Moritz Lenz escreveu: Daniel Ruoso wrote: would force item context in the capture, and here is the problem, as a capture in item context was supposed to return the invocant. Maybe we could have a different rule for captures in scalar contexts that don't

Re: returning one or several values from a routine

2009-01-06 Thread Jon Lang
Daniel Ruoso wrote: I've just realized we were missing some spots, so remaking the list of possibilities my $a = sub s1 { return a = 1 } my $b = sub s2 { return a = 1, b = 2 } my $c = sub s3 { return 1, 2, 3, a = 1, b = 2 } my $d = sub s4 { return 1 } my $e = sub s5 { return 1, 2, 3 }

Re: returning one or several values from a routine

2009-01-06 Thread Daniel Ruoso
Em Ter, 2009-01-06 às 11:28 -0800, Jon Lang escreveu: Of course, that's only a third of the problem. What should people expect with each of these: Hmm... I think that takes the discussion to another level, and the question is: what does a capture returns when coerced to a context it doesn't

Re: returning one or several values from a routine

2009-01-06 Thread Jon Lang
Daniel Ruoso wrote: Hmm... I think that takes the discussion to another level, and the question is: what does a capture returns when coerced to a context it doesn't provide a value for? The easy answer would be undef, empty array and empty hash, but that doesn't DWIM at all. The hard

Re: returning one or several values from a routine

2009-01-06 Thread TSa (Thomas Sandlaß)
On Tuesday, 6. January 2009 22:01:36 Jon Lang wrote: item($x) # Dwimmey use of item context. IIRC this is the same as $$x, right? Or does that extract the invocant slot without dwimmery? list($x) # Dwimmey use of list context. hash($x) # Dwimmey use of hash context. $x._ # the

Re: returning one or several values from a routine

2009-01-06 Thread Jon Lang
TSa wrote: Jon Lang wrote: item($x) # Dwimmey use of item context. IIRC this is the same as $$x, right? Or does that extract the invocant slot without dwimmery? Umm... good question. This is a rather nasty paradox: on the one hand, we want to be able to stack $, @, and % with capture

r24789 - docs/Perl6/Spec

2009-01-06 Thread pugs-commits
Author: particle Date: 2009-01-07 01:53:03 +0100 (Wed, 07 Jan 2009) New Revision: 24789 Modified: docs/Perl6/Spec/S19-commandline.pod Log: [S19] rip out option categories and services until they prove useful Modified: docs/Perl6/Spec/S19-commandline.pod

r24790 - docs/Perl6/Spec

2009-01-06 Thread pugs-commits
Author: particle Date: 2009-01-07 01:56:43 +0100 (Wed, 07 Jan 2009) New Revision: 24790 Modified: docs/Perl6/Spec/S19-commandline.pod Log: [S19] address concerns about mixing -e and -e6 Modified: docs/Perl6/Spec/S19-commandline.pod

r24791 - docs/Perl6/Spec

2009-01-06 Thread pugs-commits
Author: lwall Date: 2009-01-07 02:20:43 +0100 (Wed, 07 Jan 2009) New Revision: 24791 Modified: docs/Perl6/Spec/S11-modules.pod Log: [S11] clarify the intent of the -e6 remark not to be special syntax, but a natural outcome of -e and '6;' Modified: docs/Perl6/Spec/S11-modules.pod

Re: returning one or several values from a routine

2009-01-06 Thread Dave Whipp
Daniel Ruoso wrote: Hmm... I think that takes the discussion to another level, and the question is: what does a capture returns when coerced to a context it doesn't provide a value for? I'd like to take one step further, and ask what it is that introduced capture semantics in the first

Re: returning one or several values from a routine

2009-01-06 Thread Jon Lang
Dave Whipp wrote: Daniel Ruoso wrote: Hmm... I think that takes the discussion to another level, and the question is: what does a capture returns when coerced to a context it doesn't provide a value for? I'd like to take one step further, and ask what it is that introduced capture

r24792 - docs/Perl6/Spec

2009-01-06 Thread pugs-commits
Author: masak Date: 2009-01-07 06:43:05 +0100 (Wed, 07 Jan 2009) New Revision: 24792 Modified: docs/Perl6/Spec/S29-functions.pod Log: [S29] put the Cpolar function inside a list, for consistency Modified: docs/Perl6/Spec/S29-functions.pod

r24793 - docs/Perl6/Spec

2009-01-06 Thread pugs-commits
Author: masak Date: 2009-01-07 06:59:42 +0100 (Wed, 07 Jan 2009) New Revision: 24793 Modified: docs/Perl6/Spec/S29-functions.pod Log: [S29] added mentions of getc, print, say and printf, with references to S16 for details Modified: docs/Perl6/Spec/S29-functions.pod

r24795 - docs/Perl6/Spec

2009-01-06 Thread pugs-commits
Author: masak Date: 2009-01-07 07:25:35 +0100 (Wed, 07 Jan 2009) New Revision: 24795 Modified: docs/Perl6/Spec/S29-functions.pod Log: [S29] added .succ/.pred for Num, Int and Bool Modified: docs/Perl6/Spec/S29-functions.pod ===