Remove Text.Printf and System.Console.GetOpt from base
This was touched on in brief in a recent mailing list thread found at https://mail.haskell.org/pipermail/libraries/2018-October/029012.html. I propose removing
base and moving them into their own packages named
getopt that would be managed by the haskell github organization. These two libraries, when built against newer versions of base, would provide the modules. When built against old versions of base, they would simply reexport the modules. There would be breakage from doing this, but libraries and applications that use these APIs would only need to add a single line to
build-depends to continue being compatible with all versions of
The benefits of doing this are small. As a matter of principle, it seems unfair that these two APIs are blessed by being a part of base when the would likely struggle to compete if they were in ordinary libraries. In particular,
printf is less idiomatic and performs worse that the functions from
showFFloat), but its prominent position in
base encourages users to overlook the more type-safe options available for formatting numbers.
More practically, the size of base does occassionally cause problems. In https://github.com/haskell/primitive/issues/218\#issuecomment-443534850, Carter writes
base getting bigger actually hurts folk, eg, base recently got big enough that dwarf data gnerated by ghc at -g1 is now sooo much that you can't do a dwarf annotated build of base on mac OS X! anymore
Moving these APIs out of
base makes a small step toward addressing this problem.