[Haskell-cafe] Proposal: Shorter Import Syntax

Anthony Cowley acowley at seas.upenn.edu
Fri Jun 5 16:46:10 UTC 2015


Okay, we're at 28-7, now.

This is a syntax proposal, so it falls into similar territory to
existing things like TupleSections, LambdaCase, MultiWayIf, etc., and
presumably the eagerly awaited SC-proposed (::Type) syntax.

Anthony


On Fri, Jun 5, 2015 at 4:07 AM, malcolm.wallace <malcolm.wallace at me.com> wrote:
> Here are some more numbers.  In our private code base of ~12,400 modules
> totalling >2,300,000 LoC, there are ~143,800 import lines, of which ~65,000
> use the "as" syntax.  Of those, ~8,000 have no "qualified", and the
> remaining ~57,000 use "qualified".  So I make that about 5.6% of our
> imports.  I think this is quite a lot higher than the Stackage figure,
> because this code is mostly applications rather than libraries, so it tends
> to use a larger range of imported functionality from lots of different
> semi-independent domains.  The chance of naming-overlap for separate
> concepts is therefore much greater, leading to our common idiom for optional
> qualification of names with short module synonyms (often single letters).
>
> Regards,
>     Malcolm
>
>
> On 03 Jun, 2015,at 08:08 PM, Anthony Cowley <acowley at seas.upenn.edu> wrote:
>
>  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.
>
>
> _______________________________________________
> Haskell-Cafe mailing list
> Haskell-Cafe at haskell.org
> http://mail.haskell.org/cgi-bin/mailman/listinfo/haskell-cafe
>


More information about the Haskell-Cafe mailing list