On Thursday, October 03, 2013 12:45:55 Joseph Rushton Wakeling wrote: > > If you to restrict yourself to the built-in ones in your code, then use > > the > > ones at > > > > http://dlang.org/ddoc.html > > > > And if you want to define more, then create your own .ddoc file with them > > in it. But Phobos uses std.ddoc, and we add new macros to it when we feel > > that it's appropriate. > > Fair enough, but ...
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. > >> , and is there any particular reason to favour WEB over, say, LINK2 ? > > > > It's less verbose. > > ... is there any difference between WEB and LINK2 apart from the length? > And if so, why not just include WEB among the built-in macros? 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. WEB saves a bit of typing, so someone among the Phobos devs decided to add it, and we've ended up using it. But all it saves you is the http://, so for the common case at least, it's kind of redundant to have both (though you do need LINK2 for when it's not http). If someone wants WEB, they can just copy it from std.ddoc. There's a good chance that anyone doing a lot with ddoc will be copying and tweaking std.ddoc anyway. I don't see a lot of benefit in adding anything to the standard ones, particularly when there's a good chance that you're just going to end up overriding them all anyway in order to tweak them (std.ddoc does that with at least some of them - like the colors). - Jonathan M Davis
