[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index][Thread Index][Top&Search][Original]
Re: exists &sub (was: exists $foo[7] and delete $foo[7])
Spider Boardman writes:
: On Tue, 18 Jan 2000 16:28:44 -0800 (PST), Larry Wall wrote (in part):
:
: law> Other way around. It exists if there's a stub, but is
: law> defined if the stub has been assigned a body. Conveniently,
: law> that is consistent with the current definition of
: law> defined(&foo), which returns false on a mere stub.
:
: The question remains, though (as I asked in
: <200001160717.CAA14080@Orb.Nashua.NH.US>):
:
: Is C<exists &sub> something we should add? Why?
Just off the top of my head, so that things like autoloaders can easily
tell if a package has said "sub foo", indicating a desire to "stop the
buck here", particularly on an autoloader that may have been inherited
from who knows where.
You might argue that you could always use *foo{CODE} for the same thing,
but the *foo{CODE} slot can potentially be used for caching methods too,
so it means something slightly different.
: If so, should it be for 5.6?
It's kinda nice, it doesn't break anything, it increases orthogonality
if you squint at it right, and it might even be useful. And, as you
say, there's a patch. Other than that, no reason at all. :-)
Larry
- References to:
-
Spider Boardman <spider-perl@Orb.Nashua.NH.US>
[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index][Thread Index][Top&Search][Original]