[Haskell-cafe] If you'd design a Haskell-like language, what would you do different?

Jerzy Karczmarczuk jerzy.karczmarczuk at unicaen.fr
Fri Mar 9 12:38:18 CET 2012

 John Meacham :
> 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.
> 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
> out.
Personally I hate thinking about bottom as "value". I don't do this. I
NEVER teach that. And, I am a "lazy guy", almost all my Haskell programs
are strongly based on laziness.

I'll tell you what I teach, and you might throw some tomatoes...
"The fundamental thing that differentiates Haskell from other languages
and the source of it power" - if I might cite you - is that we don't see
the difference between an object and the process which creates it.  (The
difference demands that we speak about the call-by-need, etc...)
The bottom, as sin (2*pi), or "Text" may be seen as processes. Anyway, a
lazy list IS a process /par excellence/. The _|_ entity is a process
which refuses to give you a value (or does it in a deadly way). Your
program manipulates processes. A process in some computational context
must do something - or not. The bottom never does anything useful.

All this is probably a question of language, of terminology, of
preconceptions (of all that, what for God knows which reasons, Americans
call "just semantics"), but I will not forget the day when I thought as
you, and I had to explain to 2-nd year students what does it mean: a
value which doesn't have a value...

Thank you.

Jerzy Karczmarczuk

More information about the Haskell-Cafe mailing list