[Haskell-cafe] If you'd design a Haskell-like language, what would you do different?
john at repetae.net
Wed Mar 7 22:32:06 CET 2012
On Mon, Dec 19, 2011 at 7:10 PM, Alexander Solla <alex.solla at gmail.com> wrote:
> * Documentation that discourages thinking about bottom as a 'value'. It's
> not a value, and that is what defines it.
The fact that bottom is a value in Haskell is the fundamental thing that
differentiates Haskell from other languages and the source of its power. The
fact that f _|_ /= _|_ potentially _is_ what it means to be a lazy language.
It is what allows us to implement loops and conditionals as normal functions
rather than requiring special and limited language contexts. But more
importantly, it is required to think about _|_ as a value in order to prove
the correctness of many algorithms, it is the base case of your inductive
reasoning. A Haskell programmer who cannot think of _|_ in that way will
plateau as very useful idioms such as tying the knot, infinite data
structures, etc.. are just complicated to think about in operational
semantics when they get more interesting than an infinite list. Not treating
_|_ as a value would be a huge disservice to anyone learning the language.
Sure, it may seem a little strange coming from the imperative world to think
of it as a value, but it is by far the oddest concept in Haskell, after all,
_functions_ are values in Haskell and people seem to eventually figure that
More information about the Haskell-Cafe