Re: unhead

Yitzchak Scott-Thoennes <[email protected]>
Newsgroups gmane.comp.lang.perl.fun
Organization bs"d
Message-ID <[email protected]>
On Sat, Sep 25, 2004 at 07:09:31PM -0700, "Randal L. Schwartz" <[email protected]> wrote:
> Well, it also presumes that "!" returns literally 0 and 1.  I've
> never seen a promise of that in any docs.

$ perl -we'use overload "!"=>sub{"whoa"}; print !bless{}'
whoa

> I think Perl6 should return "42" for true, just to keep people
> from making that presumption.

overload notwithstanding, it's a useful presumption.

In any case, it doesn't return literally 0; it returns PL_sv_no, which
has a numeric value of 0 and a string value of "".
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.