Re: RFC 57 (v1) Subroutine prototypes and parameters
[email protected] (Jonathan Scott Duff) Tue, 8 Aug 2000 11:34:47 -0500
| Newsgroups | perl.perl6.language.subs |
|---|---|
| Message-ID | <[email protected]> |
On Tue, Aug 08, 2000 at 08:49:07AM -0700, Nathan Wiger wrote:
> > True.
> >
> > I wonder if we could change '=>' to always quote the lhs, even if
> > prefixed by '$', '@', or '%' (maybe we should only enable this
> > behaviour inside parameter lists?) That would allow us to do this.
>
> That's gonna take some digestion time.
>
> In the meantime, is there a reason the suggestion of:
>
> > foo($x := 10, $y := 20)
>
> was dropped? It seems pretty obvious to me. Or what about:
or even
foo($x : 10, $y : 20);
>
> foo($x ||= 10, $y ||= 20);
That already has a meaning ... I tend to favor syntax that doesn't
already have meaning here, thus the following are no good for me:
foo($x => 10, $y => 20);
foo($x = 10, $y = 20);
foo({$x => 10, $y => 20 } );
foo($x ||= 10, $y ||= 20);
But, these are okay:
foo($x : 10, $y : 20);
foo($x := 10, $y := 20);
although that second one gives me the pascal-shakes ;-)
-Scott
--
Jonathan Scott Duff
[email protected]