3 ms·
I'm sorry, I don't understand or maybe I wasn't clear. These extensions change the meanings (semantics and syntax) of Haskell programs accepted by the compiler.
by todd8 9y ago
I'm sorry, I don't understand or maybe I wasn't clear. These extensions change the meanings (semantics and syntax) of Haskell programs accepted by the compiler. A program which would normally terminate using Haskell's ordinary lazy semantics might not terminate when using the Strict extension that changes the default semantics to less lazy.
As far as I can tell from blogs like [1], the other language extensions also change the language in ways that are not forward and backward compatible with out-of-the-box Haskell.
[1] https://ocharles.org.uk/blog/ https://ocharles.org.uk/blog/
- tome 9y agoYou were perfectly clear, but just mostly incorrect, I think. You are correct that Strict is a language extension that significantly changes the semantics of a Haskell program. It's a new extension so it didn't cross my mind. But besides Strict the number of extensions that change semantics of existing programs in a significant but non-forward and -backward compatible way is very, very small. Basically, the summary of Haskell extensions is: Around half of them are new features that should be in the language standard but aren't because a new standard hasn't been produced for years. Around half of them extend (not change) the language in powerful ways and are best avoided unless you really need them. Around Ɛ% are things that significantly change the semantics, and 0% are things that mean you're programming in a "different, incompatible, language" (all extensions are compatible across module boundaries).
- todd8 9y agoThanks, I won't give up on Haskell yet. You make a good point that should have been obvious to me: the extensions are confined to the module boundaries.
- tome 9y agoGood luck on your Haskell journey! I hang out on https://www.reddit.com/r/haskell/ https://www.reddit.com/r/haskell/ so feel free to come over there if you have any questions. (And to add some precision, some extensions may be visible across boundaries, but almost all are not, and the extent to which they are is very small).