Re: Parenthasized not in Perl 6 -> not()

2 views
Skip to first unread message

Larry Wall

unread,
Feb 22, 2005, 11:30:12 PM2/22/05
to perl6-l...@perl.org
On Tue, Feb 22, 2005 at 10:21:00PM -0600, Steve Peters wrote:
: A recent bug that showed up in Perl 5 caused a few people to wonder what
: the purpose of C<not()>. It worked up to Perl 5.6 and returned the same
: value as C<not(0)>. Starting with 5.6, it just core dumped. This has been
: fixed it in the current bleadperl to go back to its original functionality of
: behaving like C<not(0)>. Obviously, this is not a regularly used functionality
: since it took almost five years to be found. The question that a few of us
: discussed is whether it should be allowed at all? Is it a syntax error?
: If not, what is its purpose?

In Perl 6, not() happens to be a list op just to save a precedence
level, so calling it with 0 args is legal and happens to return a
null list in list context, and undefined in scalar context, I expect.
Sometimes my expector is suspect, however.

Larry

Steve Peters

unread,
Feb 22, 2005, 11:21:00 PM2/22/05
to perl6-l...@perl.org
A recent bug that showed up in Perl 5 caused a few people to wonder what
the purpose of C<not()>. It worked up to Perl 5.6 and returned the same
value as C<not(0)>. Starting with 5.6, it just core dumped. This has been
fixed it in the current bleadperl to go back to its original functionality of
behaving like C<not(0)>. Obviously, this is not a regularly used functionality
since it took almost five years to be found. The question that a few of us
discussed is whether it should be allowed at all? Is it a syntax error?
If not, what is its purpose?

Steve Peters
st...@fisharerojo.org

Reply all
Reply to author
Forward
0 new messages