Ddoc WEB function

Joseph Rushton Wakeling joseph.wakeling at webdrake.net
Fri Oct 4 02:47:52 PDT 2013


On 03/10/13 20:06, Jonathan M Davis wrote:
> I don't see the problem. If you want the standard set of macros, then look at
> the docs. If you want more, then add your own. We need more in the Phobos
> docs, so we define more - many of which wouldn't even make sense as standard
> macros. I see no reason to restrict Phobos to the standard set of macros.

I wouldn't dream of restricting Phobos just to the standard macros, but I did 
find it a little odd to define a new macro that does essentially much the same 
as a built-in one.  I suppose the logic would be that if you use WEB for 
internal dlang.org links, and LINK2 for externals, then you can control the 
protocol used for dlang.org -- e.g. switch everything from http to https if that 
ever becomes desirable.

> I don't know how Walter arrived at the standard ones. I don't think that we
> ever mess with those at this point. If we need new ones, we add them to
> std.ddoc.

The main problem was that I didn't know about std.ddoc (it's in the dlang.org 
repo and not the Phobos one).  Now that I know, it's trivial to build a single 
Phobos doc file with

     dmd -o -D std/whatever.d ../dlang.org/std.ddoc

I'd had some hassles building the docs en masse previously, and it was annoying 
to have to rebuild the lot when the goal was to check the tweaked docs of a 
single file.

So, thanks for the insight, and apologies if it seems like I'm over-complaining 
about a minor issue :-)

Best wishes,

     -- Joe


More information about the Digitalmars-d-learn mailing list