30-Dec-2013 14:19, Jacob Carlborg пишет:
On 2013-12-30 05:05, H. S. Teoh wrote:

Not only so, even without cross-referencing, the way Ddoc currently does
referencing *within* a module is faulty, because it does not take
symbols declared in nested scopes into account. For example:

    module mymodule;

    /// docs here
    struct S {
        /// docs here
        void func() { ... }
    }

    /// docs here
    void func() { ... }

Ddoc will use "func" as the identifier for *both* mymodule.func and
mymodule.S.func, so any hyperlinks to "func" will likely point to the
wrong overload of func (depending on declaration order).

This problem is actually being exhibited on dlang.org at this very
moment, in std.algorithm. Look for 'remove' in the navigation table at
the top of the page, and click on it; you'll see it jumps to the wrong
place because there's a member function called 'remove' in a struct that
took precedence over the module-level 'remove' function. (Not to mention
it breaks HTML compliance because it gives multiple elements the same
ID.)

Yeah, that's another problem.

And couple of years old at that...

--
Dmitry Olshansky

Reply via email to