Why I love D: function parameter reification

bauss jj_1337 at live.dk
Thu Jun 9 11:43:36 UTC 2022


On Thursday, 9 June 2022 at 11:39:35 UTC, Adam D Ruppe wrote:
> On Thursday, 9 June 2022 at 08:19:05 UTC, Paolo Invernizzi 
> wrote:
>> I still think that being able to reflect ddoc comments will be 
>> a huge win ... a-la-python-"__doc__"
>
> Yes, indeed, I've requested this several times, it is useful 
> for a bunch of things like this. There were PRs adding 
> `__traits(docComment, symbol)` to get it too, but rejected by 
> people who don't use D in the real world. Alas.

I really can't see any reason to reject it, it's not like it'll 
impact anything at all really.

But it really would be useful for tooling, error messages, 
validation etc.

Could in theory be used to create automated unittests by 
extracting code examples from the docs.


More information about the Digitalmars-d mailing list