[Issue 1293] New: D needs first class tuples
d-bugmail at puremagic.com
d-bugmail at puremagic.com
Tue Jun 26 09:49:00 PDT 2007
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 at digitalmars.com
ReportedBy: onlystupidspamhere at 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:
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
--
More information about the Digitalmars-d-bugs
mailing list