foo => "bar" key/value literals in D!

Bauss via Digitalmars-d-announce digitalmars-d-announce at puremagic.com
Mon May 23 20:36:38 PDT 2016


On Monday, 23 May 2016 at 19:00:40 UTC, Adam D. Ruppe wrote:
> Have I gone completely mad?!?!
>
> ---
> void main() {
>         import std.stdio;
>         writeln(obj!(
>                 foo => "bar",
>                 baz => 12
>         ));
> }
> ---
>
> [...]

This is a pretty amazing find!

It's like a better version of "dynamic" from C#.


More information about the Digitalmars-d-announce mailing list