Hacker News new | ask | show | jobs
by ridiculous_fish 980 days ago
Asking as a Haskell dabbler - why are features like `ExtendedLiterals` behind an opt-in language extension? Why not just turn it on for everyone?
3 comments

This happens with the most used"(?) extensions after some time. Now for example there is Ghc2021 which sets the following extensions: https://ghc.gitlab.haskell.org/ghc/doc/users_guide/exts/cont...
Hiding language features behind opt-in flags seems weird, but after some thought I like it. Consider if C++ had similar flags, people are always saying to choose a subset of C++ to use, and flags would make that explicit and enforceable. Also, when you see a weird bit of syntax you would have an idea what to search for.
One possible reason could be that haskell has specifications (latest version is haskell 2010) and multiple implementations. So GHC cannot change the default language like this.