digitalmars.D.bugs - [Issue 1293] New: D needs first class tuples
- d-bugmail puremagic.com (28/28) Jun 26 2007 http://d.puremagic.com/issues/show_bug.cgi?id=1293
- d-bugmail puremagic.com (15/15) Jul 17 2007 http://d.puremagic.com/issues/show_bug.cgi?id=1293
http://d.puremagic.com/issues/show_bug.cgi?id=1293 Summary: D needs first class tuples Product: D Version: 1.016 Platform: Other OS/Version: All Status: NEW Severity: enhancement Priority: P2 Component: DMD AssignedTo: bugzilla digitalmars.com ReportedBy: onlystupidspamhere yahoo.se 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: 2) explicit parametric polymorphism (i.e. templates) ---- 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 --
Jun 26 2007
http://d.puremagic.com/issues/show_bug.cgi?id=1293 shro8822 vandals.uidaho.edu changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |shro8822 vandals.uidaho.edu 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; --
Jul 17 2007