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

Eugene Kirpichov ekirpichov at gmail.com
Sat Nov 7 14:09:32 EST 2009


2009/11/7 Pasqualino "Titto" Assini <tittoassini at gmail.com>:
> The syntax is similar, but what else is?
>
> 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., _|_).

> Best,
>
>                 titto
>
>
> 2009/11/6 John Dorsey <haskell at colquitt.org>:
>>> In what sense () is a 0-length tuple?
>>
>> In what sense isn't it?
>>
>> Data.Tuple is much to narrow to be of any use here.  () is in at least most,
>> if not all, of the type classes that tuples are in.  The syntax is
>> strikingly similar.
>>
>> If you ask me, it walks/quacks/smells like a duck, so it's a duck.
>>
>> Regards,
>> John
>>
>> _______________________________________________
>> Haskell-Cafe mailing list
>> Haskell-Cafe at haskell.org
>> http://www.haskell.org/mailman/listinfo/haskell-cafe
>>
>
>
>
> --
> Pasqualino "Titto" Assini, Ph.D.
> http://quicquid.org/
> _______________________________________________
> Haskell-Cafe mailing list
> Haskell-Cafe at haskell.org
> http://www.haskell.org/mailman/listinfo/haskell-cafe
>



-- 
Eugene Kirpichov
Web IR developer, market.yandex.ru


More information about the Haskell-Cafe mailing list