osthread internals: Let's cut the Thread class code in half?
Paul Backus
snarwin at gmail.com
Sun Mar 22 19:32:58 UTC 2026
On Sunday, 22 March 2026 at 16:48:42 UTC, Denis Feklushkin wrote:
> But previously (a long time ago, more than 5 years ago, I
> think) I already proposed similar cuts. (Moreover, I already
> have my own version of runtime, cut as I need it - see above).
> The main obstacle was that druntime code cannot be in a
> situation where we have two identical classes in our source
> tree, but compiled depending on the choised OS using
> `version()`), with the same method names. This is because
> classes need to be documented, but the documentation will also
> have to be duplicated and our doc parser cannot handle such a
> situation.
>
> Has anything changed since then? Have community come up with
> any tricks to get around this problem?
In Phobos, we work around problems like this by creating separate
`version (StdDdoc)` blocks, which are only used to generate
documentation and never compiled. It should be possible to do
something similar for druntime. (`version (CoreDdoc)`, maybe?)
More information about the Digitalmars-d
mailing list