Re: A6: Named vs. Variadic Parameters

2003-04-04 Thread David Storrs
On Fri, Apr 04, 2003 at 10:40:49AM -0800, Larry Wall wrote: > Yes, though it's usually been mentioned with respect to things like: > > my ($a,$b,$c) is constant = abc(); > > However, I would personally go with the prefix zone macros before using > distributed traits, just to get the zone inf

Re: A6: Named vs. Variadic Parameters

2003-04-04 Thread Larry Wall
On Fri, Apr 04, 2003 at 07:09:55AM -0800, David Storrs wrote: : On Wed, Apr 02, 2003 at 12:18:47PM -0800, Paul wrote: : : > I think Larry's accomodating everybody, here. : > Those of us who want to play with the tinkertoys will probably enjoy : > the whole box, even the little widgets that take us

Re: A6: Named vs. Variadic Parameters

2003-04-04 Thread David Storrs
On Wed, Apr 02, 2003 at 12:18:47PM -0800, Paul wrote: > I think Larry's accomodating everybody, here. > Those of us who want to play with the tinkertoys will probably enjoy > the whole box, even the little widgets that take us a while to > identify. Agreed. But I'd like to keep the identificati

Re: A6: Named vs. Variadic Parameters

2003-04-02 Thread Paul
--- David Storrs <[EMAIL PROTECTED]> wrote: > On Wed, Mar 19, 2003 at 12:19:20PM -0800, Michael Lazzaro wrote: > > I think newbies are going to unquestionably try and put the > > parameters in the same order as they expect to see the eventual > > arguments, and be durn confused it doesn't work --

Re: A6: Named vs. Variadic Parameters

2003-04-02 Thread David Storrs
On Wed, Mar 19, 2003 at 12:19:20PM -0800, Michael Lazzaro wrote: > I think newbies are going to unquestionably try and put the parameters > in the same order as they expect to see the eventual arguments, and be > durn confused it doesn't work -- I know I would. [...] > Dunno. I'm just one dat

Re: A6: Named vs. Variadic Parameters

2003-03-19 Thread Michael Lazzaro
On Wednesday, March 19, 2003, at 09:58 AM, Larry Wall wrote: : sub foo($x, [EMAIL PROTECTED], +$k) {...}# (2) OK Fine, you can set @a using positional notation, like push(), in addition to the notations available to (1). But if you set "k =>", it has to be before the list, unless you pas

Re: A6: Named vs. Variadic Parameters

2003-03-19 Thread Larry Wall
On Sat, Mar 15, 2003 at 06:46:21PM -0800, mlazzaro wrote: : Luke Palmer wrote: : : > The idea is that positional parameters are always a contiguous : > sequence in the argument list. If it looked like this: : > : > sub foo($x, ?$y, +$k, [EMAIL PROTECTED]) {...} : > : > Then one might presume

Re: A6: Named vs. Variadic Parameters

2003-03-15 Thread mlazzaro
Luke Palmer wrote: > The idea is that positional parameters are always a contiguous > sequence in the argument list. If it looked like this: > > sub foo($x, ?$y, +$k, [EMAIL PROTECTED]) {...} > > Then one might presume to call it like: > > foo($x, $y, $k, 1, 2, 3); > > Which they ca

Re: A6: Named vs. Variadic Parameters

2003-03-14 Thread Luke Palmer
> When calling a sub that has both named params and a slurpy list, the > slurpy list should always come last. If a sub has both a slurpy hash > and a slurpy list, the slurpy list should still always come last. You > simply can't credibly have anything after the slurpy list, or it'll be > slur

A6: Named vs. Variadic Parameters

2003-03-14 Thread Michael Lazzaro
A simple question, I hope... From A6, "Calling Subroutines", comes the following: multi push(@array, +$how, [EMAIL PROTECTED]) {...} push(@a, how => 'rapidly', 1,2,3); # OK push(@a, 1,2,3); # WRONG, $how == 1! Oops! What you really wanted to say was: multi