3 ms·
A few years ago when I was still learning Haskell and typeclasses I was a bit surprised to learn that Haskell had this fancy typeclass feature but prelude hardl
by tinco 11y ago
A few years ago when I was still learning Haskell and typeclasses I was a bit surprised to learn that Haskell had this fancy typeclass feature but prelude hardly made use of it. I had been using Haskell for over a year already and didn't understand one of its best features because it wasn't exposed to me. A bit disgruntled I asked in the IRC channel about this and they explained to me that this was actually intentional.
It was at that time thought that by keeping prelude simple (pure FP 101 style) it was more accessible to new programmers.
Apparently that mindset was reconsidered recently.
So the big downside is that now if you teach Haskell and want to use Prelude, you'll be forced to almost immediately teach typeclasses.
In my opinion that's not a bad thing at all. Typeclasses put Haskell (and FP in general) right in league with big feature languages like C# and Java. All big features of Haskell are implemented using typeclasses (such as the reputable IO monad). Not teaching that as a fundamental feature right at the beginning only makes the next hurdle of the more category theory heavy advanced features of Haskell that much higher.
- dmit 11y agoThe other side of the coin is that the majority of newcomers will simply abandon the language if they can't figure out how to use the basic prelude functions within 30 minutes. Every hurdle (installing GHC, figuring out cabal vs stack, trying to decipher the signature of `maximum`) turns people away, potentially forever.
- avmich 11y agoInteresting, I saw the opposite effect. If a language is "just another XYZ" and can be learned quickly, people will play with it, then may be shelf it - as it usually doesn't offer new power. However, if it's "tricky", some people will become genuinely interested - and will put efforts to see if it adds abilities to their toolset.