[Haskell-cafe] Is () a 0-length tuple?

Ketil Malde ketil at malde.org
Sun Nov 8 03:52:05 EST 2009


Eugene Kirpichov <ekirpichov at gmail.com> writes:

>> In JavaScript there is a "null" value, that is the only value of the null type.
>> Isn't () the same thing?  The only value of the unary type?

> No, () has two values: () and undefined (t.i., _|_).

I'd argue that yes, they're the same thing, since any function returning
"null" in JS might also fail to terminate or terminate with an
exception.

-k
-- 
If I haven't seen further, it is by standing in the footprints of giants


More information about the Haskell-Cafe mailing list