[Issue 16458] New: std.typecons.namedTuple
via Digitalmars-d-bugs
digitalmars-d-bugs at puremagic.com
Wed Aug 31 23:57:54 PDT 2016
https://issues.dlang.org/show_bug.cgi?id=16458
Issue ID: 16458
Summary: std.typecons.namedTuple
Product: D
Version: D2
Hardware: x86_64
OS: Linux
Status: NEW
Severity: enhancement
Priority: P1
Component: phobos
Assignee: nobody at puremagic.com
Reporter: edder at tkwsping.nl
Currently creating named tuples is a bit wordy:
Tuple!(double, "x", double, "y")(1.0, 2.0);
This could be simplified by adding a namedTuple function:
namedTuple!("x", "y")(1.0, 2.0);
I have an implementation in ggplotd (named aes [1]), which could be used if
people think this is a good idea.
[1] https://github.com/BlackEdder/ggplotd/blob/aes/source/ggplotd/aes.d#L82
--
More information about the Digitalmars-d-bugs
mailing list