Overgrown software monocultures

I recently upgraded my system, including installing GHC 8.10.3. When I next built my current project, my typical -Weverything threw out something completely unsuitable:

Found ‘qualified’ in prepositive position
Suggested fix: place ‘qualified’ after the module name instead.
Luckily, I already had an easily-extendible block of warning-disabling flags, so I could very quickly add a -Wno-prepositive-qualified-module to bring the build environment back to something sensible. In the mean time, though, it did get me thinking about GHCʼs position in the Haskell ecosystem.

At this point, GHC is really the only viable compiler left. That may not seem like itʼs saying much, but I doubt -XImportQualifiedPost would have made it into the compiler if UHC or Hugs survived—or if it did, it would have been part of Haskell2020 rather than being tacked onto a miscellaneous feature release for a single implementation. Now, I donʼt necessarily have anything against that extension in particular (though I personally have absolutely no use for it), but I am rather uncomfortable with the mentality behind it. The GHC team seems to have given up consideration for language complexity. To be fair, so have most Haskellers: rioʼs recommendation of 39 extensions for you to enable in your projects by default is completely ridiculous. But for every Oh, now you can put the qualified after the module name instead of before it! 😇 it gives programmers, GHC puts another stumbling block in the way of someone who wants to throw together a toy compiler to learn about the language or the deeper theory, or a university team who wants to build something for algorithm research. The standard becomes ever less a description of the standardized language as you need to examine and duplicate ever more of the existing implementation instead.

Maybe Iʼm too sensitized to monocultures stifling parallel development like that. Iʼve mostly switched my Gentoo‐based system to compile with Clang rather than GCC, and in doing so see firsthand the dangers of assuming, just because your code works on one compiler, that itʼs correct. My current project (a web browser) is ultimately futile—not because of skill or dedication, but because HTML is being defined in response to the corporate interests behind two (and, increasingly, one) major engines, and the standards seem to be actively hostile to developing new browsers. Seeing GHC adding features just because some people thought it would be a cool idea, with little actual benefit, just triggers the warning bells for me.

(Because, really, you donʼt have to worry about big whitespace gaps if you, a., put your qualified imports in a separate paragraph from your unqualified ones, b., qualify everything with one‐ or two‐letter tags, or both. Itʼs truly not a large imposition on the code.)

GHCʼs proprietary attitude towards Haskell isnʼt particularly new; despite the language specification specifically noting that unrecognized pragmas should be ignored, when HLint tried to implement its own pragma independently of GHC, it sent the entire team debating potential solutions including a centralized whitelist, forcing it into an overly‐powerful compiled envelope, using all manner of non‐pragma comment markers, formalizing a third‐party prefix; everything but simply following the spec and ignoring the unrecognized pragma—or even just removing that check from the default warnings—which was quickly and definitively shot down. New language extensions are proposed and hammered out purely as proposals to the compiler, rather than in the broader community (though admittedly thereʼs often a lot of excited chatter over the general channels which then feeds back into the proposal), and the expectation is that the next version of the specification will draw from those. Haskell is inarguably led now not by impartial parties, not by a committee representing counterbalancing interests, but by GHC and its dev team.

Maybe Iʼm overreacting. I still love the language, and nothing has given me major cause for concern about its future direction. But Iʼm sitting here, looking at what has become of HTML, and I canʼt help but imagine the next John Meacham trying to build something which can compile just enough packages on Hackage to be remotely viable, and burning out long before they have anything to show for it. Or, for that matter, skimming though the table of contents for the EMCAScript (JavaScript) specification, and knowing thatʼs just a fraction of what I would be expected to implement.