Why does the example on page 8 of TDPL work without importing std.algorithm for splitter?

Lars T. Kyllingstad public at kyllingen.NOSPAMnet
Tue Jan 4 00:26:21 PST 2011

On Mon, 03 Jan 2011 17:18:34 -0600, Ellery Newcomer wrote:

> If you're importing some other phobos module, I would guess an instance
> of this bug: http://d.puremagic.com/issues/show_bug.cgi?id=314
> On 01/03/2011 10:56 AM, Bryce Watkins wrote:
>> However when I use splitter in my code it works without having imported
>> std.algorithm.

That's right.  std.string does a public selective import of startsWith() 
and endsWith() from std.algorithm, and bug 314 causes the whole module to 
be imported publically.

314 is a huge, gaping hole in the module system.  AFAIK, it's a high-
priority bug, but also one that is very difficult to fix for some reason.


More information about the Digitalmars-d-learn mailing list