Comment #0 by onlystupidspamhere — 2007-06-26T11:48:57Z
There has been discussion in the NG about removing the hackish C/C++ style comma operations from the grammar or at least moving them from the general expression level to the areas where they are mostly used. The old style sequencing could be preserved in e.g. for loops. The gap can be easily filled with tuple literals. One proposed syntax for literals is
(elem1, ..., elemn)
The syntax could be used for unifying similar concepts that are currently similar, but distinct. Possible uses include but are not limited to:
1) function return types, arguments and parameters (e.g. #538)
2) explicit parametric polymorphism (i.e. templates)
3) declaration and assignment statements (e.g. #1288)
This unification might also help solving bugs like #1064.
----
Example thread from the ng (I'm sure there are more of them):
http://www.digitalmars.com/d/archives/digitalmars/D/learn/Tuple_mixins_7701.html
Comment #1 by shro8822 — 2007-07-17T11:56:55Z
another case where is would help is this:
template Types(A...)
{
template Values(A a)
{
}
}
alias Types!(int, bool, int[]).Values!(1,true,[1,2,3]) bob;
Comment #2 by razvan.nitu1305 — 2019-07-13T11:13:58Z
D2 now has Tuple and D1 is obsolete. Closing as WONTFIX.