Summary: Heavy reliance on Bug 3534 in Phobos range usage
           Product: D
           Version: D2
          Platform: Other
        OS/Version: Windows
            Status: NEW
          Severity: major
          Priority: P2
         Component: Phobos
        Depends on: 3535

--- Comment #0 from David Simcha <> 2010-09-18 11:58:44 PDT ---
Sort of a meta-bug.  Large portions of Phobos are relying on Bug 3534 to allow
const/immutable arrays to be used as ranges, because this bug allows calling
popFront() and popBack() on them.  Example from std.string:

indexOf(Char1, Char2)(in Char1[] s, in Char2[] sub,
        CaseSensitive cs = CaseSensitive.yes)
    // Somewhere in the function body:
    immutable result = s.length - std.algorithm.find(s, sub).length;

This code doesn't work if std.array.popFront() is modified to not be callable
on const/immutable arrays.

This is just one example.  There are several more across much of Phobos.

Configure issuemail:
------- You are receiving this mail because: -------

Reply via email to