4 ms·
I would say 'by-demand lazy' failed. The by-demand implementation gives a guarantee that an expression is never evaluated if it is not used. Other non-strict f
by yvdriess 8y ago
I would say 'by-demand lazy' failed.
The by-demand implementation gives a guarantee that an expression is never evaluated if it is not used. Other non-strict forms exist where every expression will be touched, but no guarantees are given on the ordering. MIT's pH Haskell dialect is an example of this.
- Guvante 8y agoI could never figure out how to parse something between evaluating inside out (strict) and outside in (lazy, well ignoring the complexity around multiple evaluations). Every informal definition I thought of seemed too weak to be useful. This was due to the core problem that generally speaking the coder needs to know if a particular expression will be evaluated using local reasoning (e.g. if I get here will `A` or `B` be evaluated) and without by-demand or strict you can't make that guarantee. Taking a quick look at pH it looks like they haven't figured out the semantics quite yet so that isn't a true answer to the question either. Have there been any other non-strict languages with well known semantics? (Excluding things like Prolog)