Darren Duncan wrote:
> Jon Lang wrote:
>> Spitballing here: you drew an analogy to the feed operators. I wonder
>> if that analogy could be taken further: use --> and <-- outside of
>> signatures as feed operators - but instead of feeding arrays back and
>> forth, have them feed capture objects an
Jon Lang wrote:
And AFAIK the token --> is used in exactly one place in perl 6: within
signature syntax, to mark the transition from the parameter signature
to the "return type" signature. As with Darren, I don't see why this
would be a big problem. The biggest stumbling block that I can think
Darren Duncan wrote:
> Maybe the problem is a technicality with the parser because ...
>
> I'm guessing that the problem is that until you see the <-- then what you've
> read so far on its left is ambiguous as to whether it is a result type or a
> parameter. I can understand that but I don't know
Larry Wall wrote:
On Thu, Mar 19, 2009 at 02:18:35PM -0700, Darren Duncan wrote:
Yes, --> is the "of" type, not the "as" type, as S02 I think says.
Good to know.
Second, since the "sub NAME (PARAMS --> RETTYPE) {...}" form looks nice
visually, I would like to request a variant of that form,
On Thu, Mar 19, 2009 at 02:18:35PM -0700, Darren Duncan wrote:
> I have a question and a request.
>
> In http://perlcabal.org/syn/S06.html#Named_subroutines it says:
>
> The general syntax for named subroutines is any of:
>
> my RETTYPE sub NAME ( PARAMS ) TRAITS {...}# lexical only
>
I have a question and a request.
In http://perlcabal.org/syn/S06.html#Named_subroutines it says:
The general syntax for named subroutines is any of:
my RETTYPE sub NAME ( PARAMS ) TRAITS {...}# lexical only
our RETTYPE sub NAME ( PARAMS ) TRAITS {...}# also package-scoped