<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
</head>
<body text="#000000" bgcolor="#FFFFFF">
<p>I didn't know that about other functional languages. As a
retiree, I just program for fun and have done some in Haskell,
whence I picked up 'otherwise', which I much prefer.<br>
</p>
<div class="moz-cite-prefix">On 3/30/2019 1:45 AM, Richard O'Keefe
wrote:<br>
</div>
<blockquote type="cite"
cite="mid:CABcYAdK=mtBKLmnbLkwYNSdnM4wLPaWbu8iWN42nYXOCxPy9Jw@mail.gmail.com">
<meta http-equiv="content-type" content="text/html; charset=UTF-8">
<div dir="ltr">
<div class="gmail_default"
style="font-family:monospace,monospace">Just for the record,
every functional programming</div>
<div class="gmail_default"
style="font-family:monospace,monospace">language I know that
*has* guards uses true just</div>
<div class="gmail_default"
style="font-family:monospace,monospace">the way Erlang does.
This actually goes back all</div>
<div class="gmail_default"
style="font-family:monospace,monospace">the way to Lisp, where
"if" had no "else". You</div>
<div class="gmail_default"
style="font-family:monospace,monospace">wrote (COND (g1 b1)
... (gn bn) (T be)), where T</div>
<div class="gmail_default"
style="font-family:monospace,monospace">was (and remains)
Lisp's version of 'true'.</div>
<div class="gmail_default"
style="font-family:monospace,monospace">Clean and Haskell
allow 'otherwise' as a synonym</div>
<div class="gmail_default"
style="font-family:monospace,monospace">of 'True'. I stick
with 'True' because it is</div>
<div class="gmail_default"
style="font-family:monospace,monospace">easier for me to
understand.<br>
</div>
</div>
<br>
<div class="gmail_quote">
<div dir="ltr" class="gmail_attr">On Fri, 29 Mar 2019 at 03:16,
<<a href="mailto:zxq9@zxq9.com" target="_blank"
moz-do-not-send="true">zxq9@zxq9.com</a>> wrote:<br>
</div>
<blockquote class="gmail_quote" style="margin:0px 0px 0px
0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">On
2019年3月27日水曜日 18時21分36秒 JST Donald Steven wrote:<br>
> As someone very new to Erlang, I find it interesting to
follow the <br>
> discussion on guards.<br>
> <br>
> <br>
> FWIW, the *only* thing about Erlang that drives me to
distraction is the <br>
> use of the atom 'true' as a reliable "or, if the above
ain't so" default <br>
> value for the expression. If only (how I wish it were
so) the atom <br>
> wasn't so often completely at odds -- and at times the
inverse -- of the <br>
> normal English 'read' of the if expression. Please
consider <br>
> grandfathering 'true' (not to break old code) and coming
up with a <br>
> logically less committed atom-of-the-future such as
'default' or <br>
> 'otherwise'.<br>
<br>
Use `case` and general matching instead of `if` and other
boolean constructs<br>
and your life will be better.<br>
<br>
In Erlang boolean comparison constructs apply mostly in
*range* comparisons,<br>
not general comparisons. `if` means something *very* different
in Erlang<br>
than you're used to.<br>
<br>
-Craig<br>
_______________________________________________<br>
erlang-questions mailing list<br>
<a href="mailto:erlang-questions@erlang.org" target="_blank"
moz-do-not-send="true">erlang-questions@erlang.org</a><br>
<a href="http://erlang.org/mailman/listinfo/erlang-questions"
rel="noreferrer" target="_blank" moz-do-not-send="true">http://erlang.org/mailman/listinfo/erlang-questions</a><br>
</blockquote>
</div>
<br>
<fieldset class="mimeAttachmentHeader"></fieldset>
<pre class="moz-quote-pre" wrap="">_______________________________________________
erlang-questions mailing list
<a class="moz-txt-link-abbreviated" href="mailto:erlang-questions@erlang.org">erlang-questions@erlang.org</a>
<a class="moz-txt-link-freetext" href="http://erlang.org/mailman/listinfo/erlang-questions">http://erlang.org/mailman/listinfo/erlang-questions</a>
</pre>
</blockquote>
</body>
</html>