[erlang-questions] Guards syntax for multiple values
Jesper Louis Andersen
jesper.louis.andersen@REDACTED
Wed Mar 27 15:14:25 CET 2019
On Wed, Mar 27, 2019 at 2:28 PM Dmitry Belyaev <be.dmitry@REDACTED> wrote:
> If I remember correctly Idris has eager evaluation and also defines 'if
> then else' in the standard library. So I believe lazy evaluation is not
> really required for that.
>
>
Two points:
* In a total language, evaluation order only matters insofar efficiency is
concerned. The result would be the same, regardless of evaluation order.
* Idris implementation types the branches as Lazy, so it explicitly marks
those as lazily evaluated. Evaluation order is but a mode of execution, so
converting between them is possible. A lazy by default language often
requires strictness annotations for efficiency reasons. And likewise, a
strict language enjoy having explicit laziness for efficiency reasons,
where efficiency encompasses execution time as well as space usage.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://erlang.org/pipermail/erlang-questions/attachments/20190327/eedaf0ea/attachment.htm>
More information about the erlang-questions
mailing list