<html><head><meta http-equiv="content-type" content="text/html; charset=utf-8"></head><body dir="auto"><div>Oh, I can see lots of uses for it. Making objects act as True or False, depending on their contents comes most strongly to mind. "if ($thing_in_db) { # thing is in db } else { # thing is not in db }"</div><div id="AppleMailSignature"><br></div><div id="AppleMailSignature">But mostly I think two things from this syntax:</div><div id="AppleMailSignature">1. How the heck are you going to grep your code usefully for "but"?</div><div id="AppleMailSignature">2. Making things True or False by programmer fiat is going to cause a whole pile of hard-to-debug errors unless it's backed up by coding standards enforced with a BIG stick. </div><div id="AppleMailSignature"><br></div><div id="AppleMailSignature">In any event, I wish I could've gone to the presentation. I haven't had any time to play with Perl 6 yet, but it looks like it's going to be an interesting playground.<br><br><div>-- Mike</div><div>______________________________</div><div>Michael Friedman</div><div><a href="mailto:frimicc@gmail.com">frimicc@gmail.com</a></div></div><div><br>On Nov 7, 2015, at 11:34 PM, Douglas E. Miles <<a href="mailto:doug@veritablesoftware.com">doug@veritablesoftware.com</a>> wrote:<br><br></div><blockquote type="cite"><div>
<meta content="text/html; charset=utf-8" http-equiv="Content-Type">
<div class="moz-cite-prefix">Since you weren't at the presentation,
the real case for this feature was for things like the <tt>system
</tt>function, where it returns 0 on success, so you can do things
like:<br>
<br>
<tt>my $foo = 0 but True;</tt><br>
<br>
The equivalent in Perl 5 was 0e0. Anyway, it was just something I
had read about but hadn't tried, and as I noted, "This is evil".
:)<br>
<br>
P.S. Good to hear from you!<br>
<br>
On 11/7/2015 10:15 PM, Mike Friedman wrote:<br>
</div>
<blockquote cite="mid:CC6E1B11-1C69-4CF1-99D3-B9EF942B1571@gmail.com" type="cite">
<meta http-equiv="content-type" content="text/html; charset=utf-8">
<div>Some language features really should never be used. NEVER. <br>
<br>
<div>-- Mike</div>
<div>______________________________</div>
<div>Michael Friedman</div>
<div><a moz-do-not-send="true" href="mailto:frimicc@gmail.com">frimicc@gmail.com</a></div>
</div>
<div><br>
On Nov 7, 2015, at 2:59 PM, Douglas E. Miles <<a moz-do-not-send="true" href="mailto:doug@veritablesoftware.com"></a><a class="moz-txt-link-abbreviated" href="mailto:doug@veritablesoftware.com">doug@veritablesoftware.com</a>>
wrote:<br>
<br>
</div>
<blockquote type="cite">
<div>
<meta http-equiv="content-type" content="text/html;
charset=utf-8">
I had to try this one for myself just to make sure it actually
worked.<br>
<br>
<b>liar.p6:</b><br>
<hr size="2" width="100%"><tt>#!/usr/bin/env perl6</tt><tt><br>
</tt><tt><br>
</tt><tt>use v6;</tt><tt><br>
</tt><tt><br>
</tt><tt>my $foo = True but False;</tt><tt><br>
</tt><tt>say $foo;</tt><br>
<hr size="2" width="100%"><b>Output:</b><br>
<hr size="2" width="100%"><tt>$ ./liar.p6</tt><tt><br>
</tt><tt>False</tt><br>
<br>
Note that this is only true (but False) for the value of <tt>$foo</tt>.
It does not re-define <tt>True</tt> as <tt>False</tt>
globally.<br>
<br>
P.S. This is evil. :)<br>
</div>
</blockquote>
<blockquote type="cite">
<div><span>_______________________________________________</span><br>
<span>Phoenix-pm mailing list</span><br>
<span><a moz-do-not-send="true" href="mailto:Phoenix-pm@pm.org">Phoenix-pm@pm.org</a></span><br>
<span><a moz-do-not-send="true" href="http://mail.pm.org/mailman/listinfo/phoenix-pm">http://mail.pm.org/mailman/listinfo/phoenix-pm</a></span></div>
</blockquote>
</blockquote>
<br>
</div></blockquote></body></html>