What is a tuple and why should one care?

Pelle pelle.mansson at gmail.com
Fri Oct 8 10:01:22 PDT 2010


On 10/08/2010 02:37 PM, Justin Johansson wrote:
> There's a lot of (imho, pointless) discussion going on about
> tuples in D.
>
> I've asked before and haven't any illumination, especially of Walter.
>
> In the context of D, can someone please enlighten me as to exactly
> what a tuple is supposed to be.
>
> The discussion so far appears to me to be focusing on syntax
> for these "tuple thing-a-m-be's" without defining what the bloody
> thing-are-might-be's are.
>
> Thanks in advance for zen enlightenment,
> Justin Johansson

Hello, this thing here that I don't understand is pointless.

Tuples are ordered heterogeneous sequences of fixed length. They exist 
in std.typecons. What is proposed is a syntax for unpacking them. This 
has been proven useful in many languages, such as python and haskell.


More information about the Digitalmars-d mailing list