On Wed, Sep 04, 2002 at 04:01:50PM -0400, [EMAIL PROTECTED] wrote:
> It was settled a while ago that sub arguments would be defaulted like this:
>
> sub load_data ($version / /=1) {...}
>
> (The space between / and / is on purpose, my emailer has problems if they
> are together) I and a few
From: Jonathan Scott Duff [EMAIL PROTECTED]
> Or are you proposing to *only* replace //=? Or are you
> proposing to *only* replace //= in subroutine declarations?
Only augment //= in subroutine declarations, //= would also work.
> What issues did you have with //=? It seems clear and concis
On Wed, Sep 04, 2002 at 04:43:25PM -0400, [EMAIL PROTECTED] wrote:
> Only augment //= in subroutine declarations, //= would also work.
> I love the //= operator, but in the context of sub declarations it's
> confusing as the *only* way to default an argument.
Oh. You want default() to be synon
From: Jonathan Scott Duff [EMAIL PROTECTED]
> Oh. You want default() to be synonymous with //= but only in
> subroutine declarations. That seems a tad odd. Why not make it
> synonymous everywhere?
>
> my $foo is default(23); # same as ...
> my $foo //= 23;
Well, for "is default" to DWIM i
On Wed, Sep 04, 2002 at 05:06:32PM -0400, [EMAIL PROTECTED] wrote:
> Is there a general rule that a property must make sense in all contexts?
Nah, I was just being distracted by work and not thinking clearly
about your default() proposal. :-)
-Scott
--
Jonathan Scott Duff
[EMAIL PROTECTED]
On Wed, Sep 04, 2002 at 03:48:41PM -0500, Jonathan Scott Duff wrote:
> On Wed, Sep 04, 2002 at 04:43:25PM -0400, [EMAIL PROTECTED] wrote:
> > Only augment //= in subroutine declarations, //= would also work.
> > I love the //= operator, but in the context of sub declarations it's
> > confusing as
In a message dated Wed, 4 Sep 2002, Andrew Wilson writes:
> On Wed, Sep 04, 2002 at 03:48:41PM -0500, Jonathan Scott Duff wrote:
> > On Wed, Sep 04, 2002 at 04:43:25PM -0400, [EMAIL PROTECTED] wrote:
> > > Only augment //= in subroutine declarations, //= would also work.
> > > I love the //= oper
Trey Harris wrote:
> A more practical application would be:
>
> my $foo;
> # Code which might or might not set $foo...
> $foo //= 23;
> # or
> $foo is default(23);
>
> In such a case, the C just looks plain odd to me.
It is. More than that, it's plain wrong. C properties are
compil
From: Trey Harris [EMAIL PROTECTED]
> Properties are meant to be out-of-band information; miko's
> suggestion would have this property setting the *value* of
> the variable.
Ah, but my exact point is that the default *isn't* set immediately. The
property is held until the sub is called. If the