__traits(documentation, X)

Dukc ajieskola at gmail.com
Thu Jan 18 17:15:07 UTC 2018


On Wednesday, 17 January 2018 at 02:19:11 UTC, Seb wrote:
> So do you have a good use cases for this?
> If this is a useful feature, the implementation can be improved 
> to be zero-cost for normal runs.

If a GUI button simply executes a function. Tooltip for it could 
be generated from the function documentation.

About being able to use the documentation comment in mixins, of 
course it would be an ill recommended thing to do. But I don't 
think it would become much of an issue since you can hardly do 
that accidently.

IMO, D can already be used more dangerously than even C++ if you 
want to: binary imports, string mixins and static ifs can be used 
for far more sophiscated hacks than the C preprocessor. But it 
does not matter since they do not encourage or trick anybody to 
do the said hacks.


More information about the Digitalmars-d mailing list