Tuple DIP

rjframe dlang at ryanjframe.com
Sat Jan 13 22:10:39 UTC 2018


On Sat, 13 Jan 2018 21:57:31 +0100, Timon Gehr wrote:

> On 13.01.2018 21:39, rjframe wrote:
>> Python and Pony use (). C++17 uses [].
> 
> Any idea why C++17 went with [] ?

I don't know; the paper[1] says it was due to "feedback from the EWG 
session in Jacksonville".

> 
> It would actually be unsatisfying to have two distinct ways to group
> together a heterogeneous list (Tuples vs. function argument lists.)
> 
> foo((a, b), c);
> 
> auto args = ((a, b), c);
> foo(args);


It makes sense; I just know I'm going to end up overlooking them while 
scanning code until I get used to it.



[1]: http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2016/p0217r3.html



More information about the Digitalmars-d mailing list