[erlang-questions] Guards syntax for multiple values
Jesper Louis Andersen
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.
* 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...
More information about the erlang-questions