
Anthony Cowley
On Wed, Jun 3, 2015 at 2:45 PM, Kosyrev Serge <_deepfire@feelingofgreen.ru> wrote:
Then wouldn't it also make sense to also:
1. eliminate the arguably confusing double-import through as-without-qualified:
import FQMN as M .. (which imports the exportlist of FQMN twice)
Does a lot of code use that? Is this a good practice? Do we want to encourage this kind of usage?
2. and take advantage of the reduced complexity by implying "qualified", wheneved "as" is present, by replacing:
import qualified FQMN as M …
with
import FQMN as M …
3. effectively drop the "qualified" keyword from use (can be done lazily)
It would break things, though.
This (2) is what I would want to do, too, ideally. However, the breakage really makes it inviable.
I tried to quantify the use of the other syntax in another email. I grepped through the source of all the packages in the Stackage Nightly package set and found that less 0.3% of imports use that syntax. It's a small number, but it's not zero, so the breakage would be unacceptable.
One can look at it this way -- the breakage is a fixed, one-time cost, whereas the confusion has a running cost. So in the end, the real question is what is our planning horizon. -- respectfully, Косырев Серёга