digitalmars.D - Where is 'tuple' in the language reference
- Steve Teale (1/1) Aug 05 2011 I see the term used, but I can't find where it is defined.
- Vladimir Panteleev (8/9) Aug 05 2011 http://d-programming-language.org/tuple.html
- Jonathan M Davis (10/11) Aug 05 2011 Probably nowhere. There are no built-in tuples in D. std.typecons.Tuple ...
- Steve Teale (5/5) Aug 05 2011 Then if they are just a library artifact, should the terms TypeTuple and...
- Jacob Carlborg (4/15) Aug 06 2011 There's .tupleof, I would consider that built-in.
- Jonathan M Davis (8/24) Aug 06 2011 True. I forgot about that one. IIRC, that's effectively a TypeTuple, but...
- Lutger Blijdestijn (6/7) Aug 06 2011 It's here: http://www.d-p-l.org/template.html#variadic-templates
I see the term used, but I can't find where it is defined.
Aug 05 2011
On Fri, 05 Aug 2011 11:55:32 +0300, Steve Teale <steve.teale britseyeview.com> wrote:I see the term used, but I can't find where it is defined.http://d-programming-language.org/tuple.html You may find the newsgroup digitalmars.D.learn more appropriate for such questions :) -- Best regards, Vladimir mailto:vladimir thecybershadow.net
Aug 05 2011
On Friday 05 August 2011 08:55:32 Steve Teale wrote:I see the term used, but I can't find where it is defined.Probably nowhere. There are no built-in tuples in D. std.typecons.Tuple is probably what you're looking for. It's a struct which defines a tuple. There's also std.typetuple.TypeTuple which is a compile time construct useful in meta- programming. But there is no tuple built into D. There has been some discussion of improving the syntactic sugar with regards to std.typecons.Tuple - either via some additional templates or possibly adding something to the language itself - but that hasn't happened yet, and there are no tuples built into D. - Jonathan M Davis
Aug 05 2011
Then if they are just a library artifact, should the terms TypeTuple and \ ExpressionTuple be present in the language reference? Maybe 'tuple' can slip in, since it is a more generic term, but even that is doubtful since it causes people to hunt through the reference to see what facilities D provides.
Aug 05 2011
On 2011-08-05 11:10, Jonathan M Davis wrote:On Friday 05 August 2011 08:55:32 Steve Teale wrote:There's .tupleof, I would consider that built-in. -- /Jacob CarlborgI see the term used, but I can't find where it is defined.Probably nowhere. There are no built-in tuples in D. std.typecons.Tuple is probably what you're looking for. It's a struct which defines a tuple. There's also std.typetuple.TypeTuple which is a compile time construct useful in meta- programming. But there is no tuple built into D. There has been some discussion of improving the syntactic sugar with regards to std.typecons.Tuple - either via some additional templates or possibly adding something to the language itself - but that hasn't happened yet, and there are no tuples built into D. - Jonathan M Davis
Aug 06 2011
On Saturday 06 August 2011 11:10:57 Jacob Carlborg wrote:On 2011-08-05 11:10, Jonathan M Davis wrote:True. I forgot about that one. IIRC, that's effectively a TypeTuple, but TypeTuple is in std.typetuple, so I'm not quite sure what the deal with that is. Regardless, TypeTuple has always been a bit confusing. It doesn't contain just types, and it's not really a tuple. It's probably a bit late in the game to give it a better name though. Adding tuples to the language like Bearophile keeps pushing for would probably make things even more confusing. - Jonathan M DavisOn Friday 05 August 2011 08:55:32 Steve Teale wrote:There's .tupleof, I would consider that built-in.I see the term used, but I can't find where it is defined.Probably nowhere. There are no built-in tuples in D. std.typecons.Tuple is probably what you're looking for. It's a struct which defines a tuple. There's also std.typetuple.TypeTuple which is a compile time construct useful in meta- programming. But there is no tuple built into D. There has been some discussion of improving the syntactic sugar with regards to std.typecons.Tuple - either via some additional templates or possibly adding something to the language itself - but that hasn't happened yet, and there are no tuples built into D. - Jonathan M Davis
Aug 06 2011
Steve Teale wrote:I see the term used, but I can't find where it is defined.It's here: http://www.d-p-l.org/template.html#variadic-templates "A Tuple is not a type, an expression, or a symbol. It is a sequence of any mix of types, expressions or symbols." The language terminology is easily confused with the constructs that phobos defines, where TypeTuple and Tuple mean different things.
Aug 06 2011