develooper Front page | perl.perl5.porters | Postings from July 2011

[perl #94972] The 'exists' function needs expansion, not depreciation

From:
Father Chrysostomos via RT
Date:
July 24, 2011 13:47
Subject:
[perl #94972] The 'exists' function needs expansion, not depreciation
Message ID:
rt-3.6.HEAD-7815-1311540424-1175.94972-15-0@perl.org
On Thu Jul 21 03:44:09 2011, abigail@abigail.be wrote:
> On Mon, Jul 18, 2011 at 01:06:17PM +0100, Zefram wrote:
> > Brendan Byrd wrote:
> > >exists may also be called on array elements, but its behavior is
> much less
> > >obvious and is strongly tied to the use of
> > >delete<http://perldoc.perl.org/functions/delete.html>on arrays.
> >
> > delete doesn't conceptually make sense on arrays, since the deleted
> > element doesn't stop existing, and it was a mistake to ever expose
> the
> > implementation detail that exists on arrays made visible.
> 
> I'd argue that delete conceptually makes a lot of sense - but I agree
> that it's original implementation neither made much sense, nor was
> very useful.

It is useful. I use it all the time. It works well in conjunction with
Class::ArrayObjects.





nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About