DDoC is very convenient for generating HTML documentation.
Sometimes, though, we need to print documentation back, for example when writing a command line tool and "-h" is passed.
I suggest __traits(ddoc, symbol)
, which would return the concatenated DDoC source of a symbol as an enum string.
If DMD compiler authors provide pointers (where to start, what methods to call) on how to do this, I will implement this myself and send a pull request.