D-Programming-Language/phobos — pull request #2095 by monarchdodra (2014-04-21 21:37:30+00:00)
Title: Scope and conditionally import `std.typecons : Tuple`

Reducing imports was a good move, but while 313 and 314 are still open, this might do more harm than good. Any program importing `std.range` (which means all of them?), now implicitly import `Tuple`/`tuple`. If the situation is not fixed *quickly* we will have created a situation where we *encouraged* missing imports. In the long run, I think it's more harm than good.

So, this pull works around the issues (For Tuple/tuple) by making the imports local rather than global. Not only does it work around the issue, it also conditionally imports them. So there is no more importing of `typecons` just 'cause you want to use `iota`.

--------

Related: I think `typecons` is a prime candidate for packaging. It's a collection of completely unrelated things... I'm getting tired of the dual `std.typecons : Tuple, tuple` import. A simpler `import std.typecons.tuple` that gets you the "package Tuple/tuple/isTuple" would be great