develooper Front page | perl.perl5.porters | Postings from January 2012

Re: defined(@arr), defined (%hash)

Thread Previous | Thread Next
From:
David Nicol
Date:
January 3, 2012 15:54
Subject:
Re: defined(@arr), defined (%hash)
Message ID:
CAFwScO_a-Z-fUtZ4RfRsoi_=dcqJvtMEzjb3uP9e_BRhVriKAA@mail.gmail.com
On Tue, Jan 3, 2012 at 4:54 PM, Ricardo Signes
> My point is more that it has already been made a weird snowflake.  I do want
> defined to create a scalar context, but right now, it's weirder.

The weirdness comes from the fact that defined creates a "defined
context" and if DEFINED was treated like the context it is, things
like
"... if defined $X ;"
could become faster than
" ... if $X "
instead of slower.

Thread Previous | Thread Next


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