[Haskell-cafe] strict, lazy, non-strict, eager

Eugene Kirpichov ekirpichov at gmail.com
Sun Dec 25 06:14:03 CET 2011


On Sat, Dec 24, 2011 at 10:49 PM, Dan Doel <dan.doel at gmail.com> wrote:

> On Sat, Dec 24, 2011 at 2:31 AM, Albert Y. C. Lai <trebla at vex.net> wrote:
> > 1. a function f is strict if  f ⊥ = ⊥
> > 2. ⊥ represents any computation which does not terminate, i.e. an
> exception
> > or an infinite loop
> > 3. "strict" describes the denotational semantics
>
> All three of these statements are true. The only potentially
> controversial one is 2, but any term that the operational semantics
> would identify as simple non-termination (which is invariably what
> they're talking about when they say 2; not some partially defined
> term) will be given denotation ⊥.
>
> > B. Actually there are more, but apparently two is already enough to cause
> > all kinds of incoherent statements. If I draw your attention to algebraic
> > semantics, will you start saying "it is too lazy, need to make it more
> > idempotent"?
>
> Yes, there are more than two. And they don't exist in completely
> separate vacuums from one another. Denotational and operational
> properties are sometimes (often?) correlated. And algebraic semantics
> is often the sweet spot for reasoning about the structure of the
> operational or denotational semantics of your code, without bringing
> in all the irrelevant details from the latter two. I can make a
> denotational semantics for System F where each term is denoted by its
> normal form (an operational concept).
>
> I think it's good to be clear on all these specifics, and people could
> do with a better recognition of the difference between (non-)strict
> and (lazy)eager (hint: you can have an eager, non-strict language).
>
Can you elaborate? That's apparently my blind spot.


> But it isn't necessarily a problem that people speak in terms of more
> than one at once. The different kinds of semantics aren't in conflict
> with one another.
>
> The main problem would be that such casual mixing prevents newcomers
> from learning the distinctions by osmosis.
>
> -- Dan
>
> _______________________________________________
> Haskell-Cafe mailing list
> Haskell-Cafe at haskell.org
> http://www.haskell.org/mailman/listinfo/haskell-cafe
>



-- 
Eugene Kirpichov
Principal Engineer, Mirantis Inc. http://www.mirantis.com/
Editor, http://fprog.ru/
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.haskell.org/pipermail/haskell-cafe/attachments/20111225/96bdb990/attachment.htm>


More information about the Haskell-Cafe mailing list