Re: new Capture behavior (Was: Re: r25685 - docs/Perl6/Spec)

2009-03-06 Thread TSa
HaloO, Daniel Ruoso wrote: Em Qui, 2009-03-05 às 18:43 -0800, Jon Lang escreveu: And more generally, would there be a reasonable way to write a single routine (i.e., implementation) that could be invoked by a programmer's choice of these calling conventions, without redirects (i.e., code blocks

Re: new Capture behavior (Was: Re: r25685 - docs/Perl6/Spec)

2009-03-06 Thread Daniel Ruoso
Em Qui, 2009-03-05 às 18:43 -0800, Jon Lang escreveu: > OK; let me get a quick clarification here. How does: > say "Hello, World!"; This is the equivalent to &say.postcircumfix:<( )>( \("Hello, World") ); > differ from: > "Hello, World!".say; This is just "Hello, World!".say; Mean

Re: new Capture behavior (Was: Re: r25685 - docs/Perl6/Spec)

2009-03-05 Thread Jon Lang
OK; let me get a quick clarification here. How does: say "Hello, World!"; differ from: "Hello, World!".say; or: say $*OUT: "Hello, World!"; in terms of dispatching? And more generally, would there be a reasonable way to write a single routine (i.e., implementation) that could be

Re: new Capture behavior (Was: Re: r25685 - docs/Perl6/Spec)

2009-03-05 Thread Darren Duncan
Darren Duncan wrote: So, is there some way, or is it reasonable for there to be, to declare a method in Perl 6 such that say it is declared with say an Array of R or Set of R etc parameter and that parameter is marked somehow, maybe with a trait, to say it automatically gains the invocant as on

Re: new Capture behavior (Was: Re: r25685 - docs/Perl6/Spec)

2009-03-05 Thread Jon Lang
Darren Duncan wrote: > Here's a question: > > Say I had an N-adic routine where in OO terms the invocant is one of the N > terms, and which of those is the invocant doesn't matter, and what we really > want to have is the invocant automatically being a member of the input list. How about allowing

Re: new Capture behavior (Was: Re: r25685 - docs/Perl6/Spec)

2009-03-05 Thread Darren Duncan
Larry Wall wrote: So what's the difference between a function and a method then? Nothing on the implementation end. The only difference is in the call end; we have different calling notations that invoke different dispatchers. Each of those dispatchers resolves the membership and ordering of i

Re: new Capture behavior (Was: Re: r25685 - docs/Perl6/Spec)

2009-03-05 Thread Larry Wall
On Thu, Mar 05, 2009 at 12:58:21PM -0300, Daniel Ruoso wrote: : Em Qua, 2009-03-04 às 20:21 +0100, pugs-comm...@feather.perl6.nl : escreveu: : > Simplify meaning of Capture and Match in item context to preserve sanity : > (an object in item context is always just itself, never a subpart) : :

Re: new Capture behavior (Was: Re: r25685 - docs/Perl6/Spec)

2009-03-05 Thread Jon Lang
Daniel Ruoso wrote: > Daniel Ruoso escreveu: >> What really got me confused is that I don't see what problem this change >> solves, since it doesn't seem that a signature that expects an invocant >> (i.e.: cares about invocant) will accept a call without an invocant, so >> "method foo($b,$c) is exp

Re: new Capture behavior (Was: Re: r25685 - docs/Perl6/Spec)

2009-03-05 Thread Daniel Ruoso
Em Qui, 2009-03-05 às 12:58 -0300, Daniel Ruoso escreveu: > What really got me confused is that I don't see what problem this change > solves, since it doesn't seem that a signature that expects an invocant > (i.e.: cares about invocant) will accept a call without an invocant, so > "method foo($b,$

new Capture behavior (Was: Re: r25685 - docs/Perl6/Spec)

2009-03-05 Thread Daniel Ruoso
Em Qua, 2009-03-04 às 20:21 +0100, pugs-comm...@feather.perl6.nl escreveu: > Simplify meaning of Capture and Match in item context to preserve sanity > (an object in item context is always just itself, never a subpart) sub foo { return 1 } my $a = foo(); That is currently expressed as tak

r25685 - docs/Perl6/Spec

2009-03-04 Thread pugs-commits
Author: lwall Date: 2009-03-04 20:20:59 +0100 (Wed, 04 Mar 2009) New Revision: 25685 Modified: docs/Perl6/Spec/S02-bits.pod docs/Perl6/Spec/S03-operators.pod docs/Perl6/Spec/S04-control.pod docs/Perl6/Spec/S05-regex.pod docs/Perl6/Spec/S06-routines.pod docs/Perl6/Spec/S09-data.po