<html>
<head>
<meta content="text/html; charset=utf-8" http-equiv="Content-Type">
</head>
<body bgcolor="#FFFFFF" text="#000000">
<p><font face="Georgia">I rarely use | myself, but I was translating
some javascript and trying not to misread it and failed to think
about the parens in that case. When the code was not working
correctly, I was scratching my head until I saw my mistake, but
my surprise was that it hadn't blown up the first time I ran it.</font><br>
</p>
<br>
<div class="moz-cite-prefix">On 1/3/17 1:11 PM, Levente Uzonyi
wrote:<br>
</div>
<blockquote
cite="mid:alpine.DEB.2.02.1701031904240.5654@login03.caesar.elte.hu"
type="cite">If you use #or: instead of #| (which should always be
the case IMO, because you hardly ever want non-short-circuit
boolean evaluation), then you'll probably not forget the
parentheses:
<br>
<br>
'a' = 'a' or: [ 'a' = 'b' ] "==> true"
<br>
<br>
Or even if you do forget them, you'll still get the expected
result
<br>
because of the higher precedence:
<br>
<br>
'a' = 'a' or: 'a' = 'b' "==> true"
<br>
<br>
Levente
<br>
<br>
On Tue, 3 Jan 2017, Bob Arning wrote:
<br>
<br>
<blockquote type="cite">
<br>
Or by people making a mistake
<br>
<br>
'a' = 'a' | 'a' = 'b' ==> false
<br>
<br>
<br>
On 1/3/17 10:06 AM, Bert Freudenberg wrote:
<br>
On Tue, Jan 3, 2017 at 1:17 PM, Bob Arning
<a class="moz-txt-link-rfc2396E" href="mailto:arning315@comcast.net"><arning315@comcast.net></a> wrote:
<br>
<br>
This has been this way for aeons, but it surprised
me:
<br>
<br>
false | 'hello' ==> 'hello'
<br>
<br>
Does anything actually depend on this being this
way?
<br>
<br>
Unlikely. It's only ever used with booleans.
<br>
<br>
- Bert -
<br>
<br>
<br>
<br>
<br>
<br>
</blockquote>
<br>
<fieldset class="mimeAttachmentHeader"></fieldset>
<br>
<pre wrap="">
</pre>
</blockquote>
<br>
</body>
</html>