https://issues.dlang.org/show_bug.cgi?id=10378
--- Comment #35 from [email protected] --- (In reply to Steven Schveighoffer from comment #34) > What I mean is, really Timon's code should be: > > string readAndLog(string filename){ > import std.file : readText; > auto text=readText(filename); > write(filename," read successfully!\n"); > return text; > } > > i.e. only use scoped imports with a qualified list of which symbols you will > use, or use a renamed import. > > This prevents any hijacking. Well, there's an arbitrary number of conventions that will prevent any hijacking. The point of my example was to expose a remaining flaw in the new import lookup design. --
