Article on Tuples
Kyle Furlong
kylefurlong at gmail.com
Sat Nov 18 22:14:27 PST 2006
Bruno Medeiros wrote:
> Walter Bright wrote:
>> http://www.digitalmars.com/d/tuple.html
>
> You have the misspell "evaluatible" there.
>
> Also, for what I see in this article, the
> http://www.digitalmars.com/d/template.html spec doc is a bit incomplete.
> No mention that Tuples can be used to "declare variables", only
> parameters. I also found the statement "A Tuple is not a type," a bit
> misleading since it seems Tuples are heading in a direction that makes
> them *somewhat* a type (you can declare variables with them, and even
> return them from functions).
>
> Another potentially misleading statement is the:
> "Tuples are static compile time entities, there is no way to dynamically
> change, add, or remove elements."
> It's true for most tuples, but not quite so for a tuple-variable, since
> you can change the elements of a tuple-variable.
>
> Speaking of tuple variables, man, that is deep stuff :P . It took me a
> while to grok that and to come up with a conceptualization that made
> sense and fit adequately. I'm thinking that tuple-variables are somewhat
> like anonymous structs, they are tuples of values, which happen to be
> Lvalues too, unlike the other expression/value templates.
>
Basically, they rock. ;)
More information about the Digitalmars-d-announce
mailing list