[Haskell-cafe] Is () a 0-length tuple?
wikigracenotes at gmail.com
Sun Nov 8 16:10:12 EST 2009
On Sun, Nov 8, 2009 at 6:21 AM, Deniz Dogan <deniz.a.m.dogan at gmail.com>
> What point are you trying to make by distinguishing JSON from
> system. "Null can be only one value." This doesn't make sense to me,
> since as you say null is not a type, but a value.
> Deniz Dogan
the ECMAScript specification, and it does refer to a "null type".. so titto
was right. My opinion is that JSON's 'type system' should be analyzed
is primarily a syntactic one. When I said "Null can be only one value",
implying that null is a type, I was referring to JSON's null, not
considering mappings between Haskell and JSON in the case of (), we should
see that () is a unit type in Haskell, null is a unit type in JSON
 I was misled by the fact that typeof null = 'object'. The logic behind
this, I think, is that null is meant to be bound to a variable that would
otherwise be a reference to an actual object value. Many have criticized
this result, e.g. Douglas Crockford (
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Haskell-Cafe