On 12/16/2016 01:24 PM, Jon Degenhardt wrote:
A suggestion: Now that the proposal details are largely fleshed out,
take a file from phobos and rewrite it in the new style. Should give
insight into aesthetics and identify remaining issues to resolve.
What a great idea. For starters, I attempted the simple exercise of
converting all module-level imports of std.array into static imports. I
stopped here:
https://github.com/dlang/phobos/pull/4962
Soon the naive approach "let's replace this import with a static import
and rebuild" ran into the midst of a comedy of errors. Code in various
other modules fails to compile. Sometimes (happy case) the error
indicates the symbol that is not seen, which is easy to fix. Other times
(as you may see if you try to touch the PR above) there is zero
indication on where the problem originates.
I invite anyone who believes DIP1005 is solving just a minor problem
and/or that we can rein in by using lazy imports and no improvement to
the language, to try their hand at continuing the PR above or starting a
similar effort. Currently it is exhaustingly difficult to figure where
names are looked up in a large D project.
Andrei