[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index][Thread Index][Top&Search][Original]

Re: exists $foo[7] and delete $foo[7]




I vote for NOT extending delete() and exists() to work on array
elements.  I fail to see the usefulness of the feature.  Exposing the
internal implementation is irrelevant and I dare say too confusing.
That "delete $a[12]" should leave the element in a different state
than "undef $a[12]" sounds like too much fun to try to explain.  Well,
yes, the element is in different internal state.  But *what for*,
externally?  What would this feature give to the programmer?  (And as
Tom pointed out, the terms "uninitialized" and "undefined" have been
used interchangeably in the past.)

I also will step forth and say that I find the current Perl-level
interface to pseudohashes most vile and think it should not get out
alive to 5.6.  The concept as such is okay, but that $a[0] is elevated
to a special role, stinks really bad.  I'd rather see, say,
a pragma interface.

-- 
$jhi++; # http://www.iki.fi/jhi/
        # There is this special biologist word we use for 'stable'.
        # It is 'dead'. -- Jack Cohen


Follow-Ups from:
Gurusamy Sarathy <gsar@ActiveState.com>
References to:
Gurusamy Sarathy <gsar@activestate.com>
Hugo <hv@crypt.compulink.co.uk>

[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index][Thread Index][Top&Search][Original]