Larry wrote:
>     $z = 0 but true;
> I'm not even particularly upset by this:
>     my bool $x = $z;            # $x == 1

Yep, that's all I mean.  I just want things like:

     my bool $lit = ($light eq "on");
     if $lit { ... }

to work such that (1) 'bool' always stores the "truth" of the
expression, _never_ the value of the expression, and (2) it does so in
whatever Perl decides is the most compact possible way.

It can resolve to 1 or 0 numeric, "1" or "0" string, so we don't need
"true" and "false" words at all.  They're not even terribly useful in
this context.

> But the moment anyone says
>     my bool $true = 1;
>     if x(1,2,3) == $true {...}
> they're just asking for a world of hurt.

Agreed: the value of comparing a boolean with anything else is not
particularly sensible in *any* language.  Anyone who does it deserves
what they get.  ;-)

MikeL

Reply via email to