Tuple DIP

Timon Gehr timon.gehr at gmx.ch
Sat Jan 13 20:57:31 UTC 2018


On 13.01.2018 21:39, rjframe wrote:
> Python and Pony use (). C++17 uses [].

Any idea why C++17 went with [] ?

> Perhaps D should use <>? [not a
> serious question]
> 
> It was hard for me not to use angled brackets for templates when I started
> with D, but now it's second nature. I think you're right, familiarity with
> other languages is important, but it isn't everything.
> ...

I'd like to stress again that the proposed syntax is standard.

> I'm not sure I like the idea of ever reading `foo((a, b), c);`, but like
> templates, I'd get used to it.

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);


More information about the Digitalmars-d mailing list