www.digitalmars.com         C & C++   DMDScript  

digitalmars.D - Replacing .tupleof

reply Shriramana Sharma <samjnaa_dont_spam_me gmail.com> writes:
Given that TypeTuple is replaced by AliasSeq (though many don't like the new 
name), it seems that .tupleof should be replaced by .fieldvalues like 
std.traits is proposed to have FieldIdentifiers and FieldTypes in 
https://github.com/D-Programming-Language/phobos/pull/3756. Thoughts?

-- 

Dec 11 2015
parent reply ZombineDev <valid_email he.re> writes:
On Friday, 11 December 2015 at 11:36:38 UTC, Shriramana Sharma 
wrote:
 Given that TypeTuple is replaced by AliasSeq (though many don't 
 like the new name), it seems that .tupleof should be replaced 
 by .fieldvalues like std.traits is proposed to have 
 FieldIdentifiers and FieldTypes in 
 https://github.com/D-Programming-Language/phobos/pull/3756. 
 Thoughts?
Incorrect. Tuple is the correct term in this case, because value.tupleof is still a run-time value. AliasSeq is for template arguments. TypeTuple was renamed to AliasSeq to avoid confusion with actual run-time tuples like .tupleof or std.typecons.Tuple.
Dec 11 2015
parent Timon Gehr <timon.gehr gmx.ch> writes:
On 12/11/2015 04:14 PM, ZombineDev wrote:
 On Friday, 11 December 2015 at 11:36:38 UTC, Shriramana Sharma wrote:
 Given that TypeTuple is replaced by AliasSeq (though many don't like
 the new name), it seems that .tupleof should be replaced by
 .fieldvalues like std.traits is proposed to have FieldIdentifiers and
 FieldTypes in
 https://github.com/D-Programming-Language/phobos/pull/3756. Thoughts?
Incorrect. Tuple is the correct term in this case, because value.tupleof is still a run-time value. ...
It is a compile-time sequence of run-time values. It avoids limitations of alias by apparently being a special case. :o) There is no way to get something of the kind that .tupleof gives you without .tupleof.
Dec 11 2015