Another use case for __traits(docComment)

Adam D. Ruppe destructionator at
Thu Nov 14 12:38:33 UTC 2019

On Thursday, 14 November 2019 at 07:50:31 UTC, Jonathan Marler 
>  Up till now, D code is written assuming that parameter names 
> are private.

Well, like I said in my last email, that assumption is wrong. 
Parameter names have been exposed via CT reflection since at 
least 2011 when I wrote my first web interface generator library 
with it.

They're even fairly conveniently available with Phobos 
<> and you can use 
this to write named param library hacks today.

call!foo(name => "bar", other_name => 23); // possible now

and of course they are always in documentation which is even more 
important imo.

> I'd also be careful about thinking about DDoc comments like 
> they are "comments". DDoc comments may be called comments but 
> they don't fit the criteria of normal comments.


More information about the Digitalmars-d mailing list