__traits(documentation, X)

Timothee Cour thelastmammoth at gmail.com
Thu Jan 18 20:21:37 UTC 2018


>> But in any case, the idea that comments affect the file you are compiling
>> *right now*, and not some other tool-generated file makes me very nervous.
>> Comments are supposed to not affect the code. Consider that with this
>> feature, the documentation now becomes part of the API.

That's already the case today that documentation can affect the code
because `import(__FILE__)` is legal. Both string import and
`__traits(documentation)` are tools and can be used for solving real
problems or abused.

Let's not invoke (impossible) ideals at the expense of pragmatism; D
is supposed to be pragmatic, not dogmatic.


More information about the Digitalmars-d mailing list