News for hackers. Stuff that matters.
Re:Reflecting on Haskell in 2017 by dualogy on Monday December 04, 2017 @02:02AM (#15842042)
"Extensions" has just turned out to be a sub-optimal moniker. They're not some third-party-compiler-plugins-to-be-installed-into-GHC, they're more like (rather involved) syntax sugars you can enable if needed. Each such "language feature" amounts to a tiny sub-compiler necessitating additional "core-to-core" and "core lint" (Core being the intermediate Typed Lambda Calculus representation all Haskell syntax sugars, built-in or "extension", compile down to) passes during compilation, which in GHC feels pretty sluggish to begin with.

So in pragmatic terms, enabling/disabling "extensions" lets you prevent some unnecessary processing loads during compilation.

Obviously one can do everything in "vanilla" (no-"extensions") Haskell just like one could express everything in raw Lambda Calculus. Syntax sugars as always allow for reducing patterns of verbosity --- those provided by "extensions" tend to be such patterns-of-verbosity that don't always occur in-all-projects-all-the-time, just in enough-projects-much-of-the-time.

Most of the aversion to them seems kneejerk "but my other language had another (or none at all) approach to this" --- never understood the strong opinions about GHC extensions. "Other-language" typically also delights in a culture of repetetively verbose syntax itself and no such APIs to hack new language constructs into the compiler in a plug-and-play manner (without forking).

And yes one can enable these via cabal file or GHC -X flags, but there's something to be said for per-module pragmas: they only activate where needed, and it aids the code reader as to what non-vanilla syntactic constructs are used in the-module-at-hand.

Re:Reflecting on Haskell in 2017 by tree_of_item on Monday December 04, 2017 @02:41AM (#15842238)
I'm aware that they're syntax sugar. I'm saying syntax sugar is bad. It's especially bad when there are dozens of mutually incompatible sugars. It's double especially bad when the base language is already one of the most complicated ones around.
Re:Reflecting on Haskell in 2017 by tome on Monday December 04, 2017 @03:31AM (#15842470)
> there are dozens of mutually incompatible sugars

If you think there are dozens then I challenge you to name a few ...

(I can't, off the top of my head, think of any but I don't deny there may be some.)

Re:Reflecting on Haskell in 2017 by njs12345 on Monday December 04, 2017 @07:05AM (#15843269)
The base language is actually very small - you do need to know a lot on top to get anything done but arguably that's true with most languages.
Re:Reflecting on Haskell in 2017 by tathougies on Monday December 04, 2017 @06:59PM (#15848706)
There are very few mutually incompatible sugars.