digitalmars.D - In the age of AliasSeq, how to refer to template tuple parameters?
- Mike Parker (15/15) Oct 01 2015 What's the official way to refer to T... now? In std.meta, I see
- John Colvin (7/22) Oct 01 2015 One approach would be to just call them an AliasSeq, defined as
- Mike Parker (3/9) Oct 01 2015 Indeed. Whatever approach I take, there's certainly going to be a
- Dicebot (5/20) Oct 01 2015 Do you want to refer to `T...` as a syntax feature or actual
- Mike Parker (8/12) Oct 01 2015 Both. I'm hesitant to use Template Tuple Parameter until I can
- Dicebot (5/18) Oct 01 2015 Naturally, a slice of argument list is still an argument list
- Jonathan M Davis (9/29) Oct 01 2015 In general, I'd just use the term AliasSeq for it all at this
- Mike Parker (10/11) Oct 02 2015 On a whim, I went to [1], which I had previously referenced in
- Mike Parker (3/7) Oct 02 2015 [1] http://dlang.org/tuple.html
- Dmitry Olshansky (5/12) Oct 02 2015 Article used terminology that was then changed sadly nobody felt strong
- Mike Parker (6/21) Oct 02 2015 I see. Well, it does mention AliasSeq. While that may work for
- Dicebot (6/8) Oct 02 2015 Heh, I have written that second article for initial `std.meta` PR
What's the official way to refer to T... now? In std.meta, I see this for AliasSeq: /** * Creates a sequence of zero or more aliases. This is most commonly * used as template parameters or arguments. */ This implies "sequence parameters". But the documentation at [1] still uses Template Tuple Parameters. I'm in the process of revising the template chapter of Learning D and I need to know how to refer to these now. It was originally written before AliasSeq came along, so I've used "tuple parameters", "type tuple" and "expression tuple" to refer to these. Do I need to change them? [1] http://dlang.org/template.html#TemplateTupleParameter
Oct 01 2015
On Thursday, 1 October 2015 at 08:20:52 UTC, Mike Parker wrote:What's the official way to refer to T... now? In std.meta, I see this for AliasSeq: /** * Creates a sequence of zero or more aliases. This is most commonly * used as template parameters or arguments. */ This implies "sequence parameters". But the documentation at [1] still uses Template Tuple Parameters. I'm in the process of revising the template chapter of Learning D and I need to know how to refer to these now. It was originally written before AliasSeq came along, so I've used "tuple parameters", "type tuple" and "expression tuple" to refer to these. Do I need to change them? [1] http://dlang.org/template.html#TemplateTupleParameterOne approach would be to just call them an AliasSeq, defined as "a sequence of aliases, such as what is created by variadic template parameters". Then you have to deal with explaining how storage classes can end up in AliasSeqs, but std.meta.AliasSeq will strip them out... It's a bit embarrassing.
Oct 01 2015
On Thursday, 1 October 2015 at 08:30:15 UTC, John Colvin wrote:One approach would be to just call them an AliasSeq, defined as "a sequence of aliases, such as what is created by variadic template parameters". Then you have to deal with explaining how storage classes can end up in AliasSeqs, but std.meta.AliasSeq will strip them out... It's a bit embarrassingIndeed. Whatever approach I take, there's certainly going to be a need for an aside to address all the different terminology.
Oct 01 2015
On Thursday, 1 October 2015 at 08:20:52 UTC, Mike Parker wrote:What's the official way to refer to T... now? In std.meta, I see this for AliasSeq: /** * Creates a sequence of zero or more aliases. This is most commonly * used as template parameters or arguments. */ This implies "sequence parameters". But the documentation at [1] still uses Template Tuple Parameters. I'm in the process of revising the template chapter of Learning D and I need to know how to refer to these now. It was originally written before AliasSeq came along, so I've used "tuple parameters", "type tuple" and "expression tuple" to refer to these. Do I need to change them? [1] http://dlang.org/template.html#TemplateTupleParameterDo you want to refer to `T...` as a syntax feature or actual arguments? Former is called "template tuple parameter" as you correctly linked indeed, but for latter there is http://dlang.org/template.html#TemplateArgumentList
Oct 01 2015
On Thursday, 1 October 2015 at 09:43:10 UTC, Dicebot wrote:Do you want to refer to `T...` as a syntax feature or actual arguments? Former is called "template tuple parameter" as you correctly linked indeed, but for latter there is http://dlang.org/template.html#TemplateArgumentListBoth. I'm hesitant to use Template Tuple Parameter until I can know for sure that's what they will continue to be called. "template argument list" seems like it could be confusing. Typically, a function argument list refers to all the arguments passed to the function. Given multiple template parameters with a T... at the end, I would expect template argument list to refer to all of them, not just the T...
Oct 01 2015
On Thursday, 1 October 2015 at 11:23:51 UTC, Mike Parker wrote:On Thursday, 1 October 2015 at 09:43:10 UTC, Dicebot wrote:Naturally, a slice of argument list is still an argument list (just smaller one) ;) But on general topic - no, there is no clear and non-confusing terminology on this topic and there have never been.Do you want to refer to `T...` as a syntax feature or actual arguments? Former is called "template tuple parameter" as you correctly linked indeed, but for latter there is http://dlang.org/template.html#TemplateArgumentListBoth. I'm hesitant to use Template Tuple Parameter until I can know for sure that's what they will continue to be called. "template argument list" seems like it could be confusing. Typically, a function argument list refers to all the arguments passed to the function. Given multiple template parameters with a T... at the end, I would expect template argument list to refer to all of them, not just the T...
Oct 01 2015
On Thursday, 1 October 2015 at 11:28:17 UTC, Dicebot wrote:On Thursday, 1 October 2015 at 11:23:51 UTC, Mike Parker wrote:In general, I'd just use the term AliasSeq for it all at this point, since that's what we're calling it in Phobos now, which should work well enough for those who already know what it is, but when you have to actually explain it, things get more complicated very quickly - and the fact that it's a language construct that we interact with via a library construct rather than really interacting with it directly doesn't help... - Jonathan M DavisOn Thursday, 1 October 2015 at 09:43:10 UTC, Dicebot wrote:Naturally, a slice of argument list is still an argument list (just smaller one) ;) But on general topic - no, there is no clear and non-confusing terminology on this topic and there have never been.Do you want to refer to `T...` as a syntax feature or actual arguments? Former is called "template tuple parameter" as you correctly linked indeed, but for latter there is http://dlang.org/template.html#TemplateArgumentListBoth. I'm hesitant to use Template Tuple Parameter until I can know for sure that's what they will continue to be called. "template argument list" seems like it could be confusing. Typically, a function argument list refers to all the arguments passed to the function. Given multiple template parameters with a T... at the end, I would expect template argument list to refer to all of them, not just the T...
Oct 01 2015
On Thursday, 1 October 2015 at 08:20:52 UTC, Mike Parker wrote:What's the official way to refer to T... now? In std.meta,On a whim, I went to [1], which I had previously referenced in the book, and found that all of the content that was previously there has been replaced by a couple of sentences pointing to std.typecons and to [2]. It also says we should no longer refer tuple is now discouraged in reference to T.... The second link is all about Compile-Time Argument Lists, which is apparently the new name. If that's the case, then the template docs need to be updated so that they no longer refer to "Template Tuple Parameters".
Oct 02 2015
On Friday, 2 October 2015 at 12:31:35 UTC, Mike Parker wrote:On a whim, I went to [1], which I had previously referenced in the book, and found that all of the content that was previously there has been replaced by a couple of sentences pointing to std.typecons and to [2]. It also says we should no longer refer[1] http://dlang.org/tuple.html [2] http://dlang.org/ctarguments.html
Oct 02 2015
On 02-Oct-2015 15:32, Mike Parker wrote:On Friday, 2 October 2015 at 12:31:35 UTC, Mike Parker wrote:Article used terminology that was then changed sadly nobody felt strong enough to rewrite the article to use AliasSeq (the e-hm actual new name). -- Dmitry OlshanskyOn a whim, I went to [1], which I had previously referenced in the book, and found that all of the content that was previously there has been replaced by a couple of sentences pointing to std.typecons and to [2]. It also says we should no longer refer[1] http://dlang.org/tuple.html [2] http://dlang.org/ctarguments.html
Oct 02 2015
On Friday, 2 October 2015 at 12:40:02 UTC, Dmitry Olshansky wrote:On 02-Oct-2015 15:32, Mike Parker wrote:I see. Well, it does mention AliasSeq. While that may work for the std.meta template, I just don't see how that's even a remotely useful name for T... It really was much easier to explain the tuple mess before these changes were made.On Friday, 2 October 2015 at 12:31:35 UTC, Mike Parker wrote:Article used terminology that was then changed sadly nobody felt strong enough to rewrite the article to use AliasSeq (the e-hm actual new name).On a whim, I went to [1], which I had previously referenced in the book, and found that all of the content that was previously there has been replaced by a couple of sentences pointing to std.typecons and to [2]. It also says we should no longer refer[1] http://dlang.org/tuple.html [2] http://dlang.org/ctarguments.html
Oct 02 2015
On Friday, 2 October 2015 at 12:31:35 UTC, Mike Parker wrote:The second link is all about Compile-Time Argument Lists, which is apparently the new name.Heh, I have written that second article for initial `std.meta` PR (one that used name `MetaList` and got reverted eventually). Looks like it was still merged with some modification for `AliasSeq` but uses my old terminology in some places. I'd warn against taking it as very official source :)
Oct 02 2015