Tuples

Diggory diggsey at googlemail.com
Mon May 27 02:25:13 PDT 2013


On Monday, 27 May 2013 at 03:28:07 UTC, deadalnix wrote:
> On Monday, 27 May 2013 at 02:31:50 UTC, Jonathan M Davis wrote:
>> On Monday, May 27, 2013 04:24:51 Diggory wrote:
>>> It also shouldn't break any code since the only addition to
>>> TypeTuple is a check to make sure that the undocumented 
>>> behaviour
>>> of using it with non-types is disallowed, and in the case that
>>> this undocumented feature is used the code can simply switch 
>>> to
>>> StaticTuple and be done.
>>
>> Well, changing TypeTuple to only accept types _will_ break 
>> code. It gets used
>> quite heavily with foreach to get a static foreach, and that 
>> can involve using
>> expressions instead of types. Anyone using TypeTuple heavily 
>> knows what it can
>> do and will probably have used it for expressions at some 
>> point. It wouldn't
>> surprise me in the least if it's already done in Phobos, and 
>> there's no way to
>> know how much it is or isn't done elsewhere.
>>
>
> Granted that nobody understand them, it is fair to say it 
> should be changed.

In case people agree:
https://github.com/D-Programming-Language/phobos/pull/1309


More information about the Digitalmars-d mailing list