[Haskell-cafe] If you'd design a Haskell-like language, what would you do different?
Heinrich Apfelmus
apfelmus at quantentunnel.de
Thu Dec 22 10:19:56 CET 2011
Alexander Solla wrote:
>> And denotational semantics is not just nice. It is useful. It's the best
>> way to understand why the program we just wrote doesn't terminate.
>
> Denotational semantics is unrealistic. It is a Platonic model of
> constructive computation. Alan Turing introduced the notion of an "oracle"
> to deal with what we are calling bottom. An oracle is a "thing" that
> (magically) "knows" what a bottom value denotes, without having to wait for
> an infinite number of steps. Does Haskell offer oracles? If not, we
> should abandon the use of distinct bottoms. The /defining/ feature of a
> bottom is that it doesn't have an interpretation.
Huh? I don't see the problem.
Introducing bottom as a value is a very practical way to assign a
well-defined mathematical object to each expression that you can write
down in Haskell. See
http://en.wikibooks.org/wiki/Haskell/Denotational_semantics
It's irrelevant whether _|_ is "unrealistic", it's just a mathematical
model anyway, and a very useful one at that. For instance, we can use it
to reason about strictness, which gives us information about lazy
evaluation and operational semantics.
Best regards,
Heinrich Apfelmus
--
http://apfelmus.nfshost.com
More information about the Haskell-Cafe
mailing list