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

Adam D. Ruppe via Digitalmars-d-announce digitalmars-d-announce at puremagic.com
Mon May 23 18:35:47 PDT 2016


On Tuesday, 24 May 2016 at 01:11:39 UTC, Meta wrote:
> Clever and terrible. Now just modify the code to generate a 
> struct or class and you've invented new anonymous struct/object 
> syntax.

Indeed.

> Also, I think this has revealed a bug (or deficiency) in the 
> compiler. If you put this inside the foreach loop:

Right, I tried that too and it didn't work... and I think it 
should, since this is an alias argument instead of a runtime 
function pointer, the names should be available.

I tried the low level is(foo params == __parameters) too to no 
avail, the compiler is the buggy one here rather than Phobos.


More information about the Digitalmars-d-announce mailing list