3 ms·
Haskell doesn't have any more language extensions than other languages of its age, the only difference is that they're explicitly called out. When Python adds
by PhineasRex 6y ago
Haskell doesn't have any more language extensions than other languages of its age, the only difference is that they're explicitly called out.
When Python adds new string formatters or generators or async, they're just in the language. When Haskell does that they require you to explicitly turn the new feature on. It's just a different strategy of managing language change. Versus the classical approach you get a lot more eyes on your language additions and have a nice "beta" period where you can make improvements before there is wide adoption.
This is basically the same approach that Rust is taking but they've been better about removing the feature flag when the feature is stabilized.
- rattray 6y agoHmm, those are language _features_ not language _extensions_, right? And yes, I think the Rust comparison is a great one – I'm not the sort of person who would want to use nightly Rust and turn on feature flags; I'd want to use Stable rust with no extra features.
- whateveracct 6y agoExtensions are just per-module importable language features. These features have tradeoffs around usability and power, so making them importable defers that tradeoff to the end programmer, who is best positioned to make those decisions. It's kind of the opposite of the paternalistic approach the Go designers take.
- PhineasRex 6y agoThis is just complaining about naming at this point. An "extension" must necessarily be extending the language with something. That something is a feature. When the GHC devs add a new feature to the language, they put it behind a flag and call it an extension. This is the only way features are added to GHC Haskell.
- dllthomas 6y ago> they've been better about removing the feature flag when the feature is stabilized. The developers of rustc define the language, while the developers of GHC are trying to be first an implementation of a purportedly independent standard. I don't raise this as defense or attack on either side, but I think it's an important bit of context in understanding the differences.