[Phoenix-pm] Tricksy! False!

Mike Friedman frimicc at gmail.com
Sat Nov 7 21:15:04 PST 2015


Some language features really should never be used. NEVER. 

-- Mike
______________________________
Michael Friedman
frimicc at gmail.com

> On Nov 7, 2015, at 2:59 PM, Douglas E. Miles <doug at veritablesoftware.com> wrote:
> 
> I had to try this one for myself just to make sure it actually worked.
> 
> liar.p6:
> #!/usr/bin/env perl6
> 
> use v6;
> 
> my $foo = True but False;
> say $foo;
> Output:
> $ ./liar.p6
> False
> 
> Note that this is only true (but False) for the value of $foo. It does not re-define True as False globally.
> 
> P.S. This is evil. :)
> _______________________________________________
> Phoenix-pm mailing list
> Phoenix-pm at pm.org
> http://mail.pm.org/mailman/listinfo/phoenix-pm
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.pm.org/pipermail/phoenix-pm/attachments/20151107/7602d9d5/attachment.html>


More information about the Phoenix-pm mailing list