core.stdc in docs?

Jonathan M Davis jmdavisProg at gmx.com
Wed Apr 11 01:34:57 PDT 2012


On Wednesday, April 11, 2012 10:24:40 Jacob Carlborg wrote:
> On 2012-04-11 01:48, Jonathan M Davis wrote:
> > Probably a good idea, but it requires putting ddoc comments on all of
> > those
> > functions in druntime (either empty ones or ones with links to the C docs
> > somewhere online), which is potentially a fair bit of work. Also, in some
> > cases, something like the StdDdoc version that Phobos uses (probably
> > either
> > CoreDdoc or just reuse StdDdoc) is going to have to be added to enable
> > documentation-specific versions (without using D_Ddoc, since that runs
> > into
> > issue with people who try and compile their documentation and actual code
> > at the same time - not a great practice IMO, but that's why StdDdoc
> > exists). Also, there have been some discussions about how druntime should
> > be split up as far as architectures and OSes go, and the documentation
> > would be affected by that.
> > 
> > - Jonathan M Davis
> 
> Perhaps a compiler switch to force outputting everything in the docs,
> even if they don't have any documentation comments. Then the
> declarations will at least show up in the documentation so people can
> find them.

It wouldn't really work in this case though, because of the OS differences. 
Only the stuff in the version blocks that are compiled will end up in the docs. 
So, if they're generated on Linux, only the linux and Posix stuff will be 
generated. Windows, FreeBSD, and MacOSX will be left out in the cold. The same 
goes if they're generated on any of the other OSes. It just changes what shows 
in the docs. StdDdoc (or CoreDdoc if we don't want to reuse StdDdoc in 
druntime) is going to need to be used liberally to document this stuff. And 
while that's not all that hard, it's still time consuming.

So, while your idea might be nice in theory, it doesn't really help in this 
particular case. Really, druntime is the prime example of where it _wouldn't_ 
work.

- Jonathan M Davis


More information about the Digitalmars-d mailing list