5 ms·
So, was that on the second page of a tutorial? Yes, Haskell has those gotchas like "don't use lazy IO", "there are partial functions on the Prelude", "String i
by marcosdumay 6y ago
So, was that on the second page of a tutorial?
Yes, Haskell has those gotchas like "don't use lazy IO", "there are partial functions on the Prelude", "String is slow", and "code may throw exceptions where you don't expect".
They are there mostly because of history and the language would be better without them. Yet, they are easily avoided and aren't that many (those above are most of them). If you rage quit every toolset that has problems, I have some really bad news for you.
- ulrikrasmussen 6y agoAnd actually all of those things are problems with the default prelude and not the language core. There are alternative preludes that one can use, and hopefully these warts will be fixed in the future. It takes time because it's a breaking change though.
- tmountain 6y agoHere's a nice summary of some of the more popular preludes. https://guide.aelve.com/haskell/alternative-preludes-zr69k1hc https://guide.aelve.com/haskell/alternative-preludes-zr69k1h...
- asplake 6y agoAre there from-scratch tutorials based on any of these?
- tmountain 6y agoThis is a good primer. https://www.stephendiehl.com/posts/protolude.html https://www.stephendiehl.com/posts/protolude.html
- asplake 6y agoThanks. I meant a recommendable tutorial for Haskell newbies that starts from scratch with modern/sane defaults. I’ve seen webdev examples with quite offputting boilerplate that I’m told could be dealt with by a prelude and I wonder if it’s a problem that people are trying to solve.
- dmitriid 6y ago> And actually all of those things are problems with the default prelude and not the language core. This directly means "a problem with the lanuage" to any beginner with the language. Since it's the default Prelude. So a beginner has to somehow learn that there are issues with Prelude, that there are other preludes, find the differences between them, select one, and then reconcile the inevitable differences between those preludes and the official one when reding various docs. ... And then figure out wich of the two dozen language extensions you need to use to even write something useful beyond a "Hello, world".
- josephcsible 6y agoWe didn't throw away C++ back when the STL was no good. Why should the situation with Haskell be different? (And Prelude's problems are way less severe than the problems the STL used to have.)
- dmitriid 6y ago> We didn't throw away C++ back when the STL was no good. You're not doing Haskell any favors by comparing with "the times when STL was no good" (when was this? 20 years ago? 30?). > Why should the situation with Haskell be different? Because the world has moved on and expects languages, their libraries and runtimes to become better.
- tome 6y ago> You're not doing Haskell any favors by comparing with "the times when STL was no good" Huh, why not? He's comparing not equating, after all. > And Prelude's problems are way less severe than the problems the STL used to have
- noncoml 6y agoThank you. You demonstrate very well what the problem is with the Haskell community, and that in a topic about Haskell adoption. For a language to be adopted it must be beginner friendly. And by beginner friendly, I don't mean easy. It can have a steep learning curve as long as it enables the user to be productive, otherwise the beginner will give up quickly. For the experienced user things like, "don't use lazy IO", "there are partial functions on the Prelude", "String is slow", and "code may throw exceptions where you don't expect", may be obvious, but are not for the beginner. I don't remember exactly how I ended up using "lazy IO", but trust me it wasn't because I ignored a big fat warning that I should NOT be using it. It's gotchas like these that prevent the beginner from being productive. Then the beginner reaches out to the community sharing his experience and gets a defensive and passive aggressive reply like yours. It's enough to make them not want to touch that language ever again. You think you are defending your favorite language, but actually you are doing more harm.
- whateveracct 6y agohaskell is a language for experts. quite frankly, it does not need runaway success to be successful. it can remain a top 20 or whatever language popularity-wise and remain best-in-class for experts. once you are the expert, you would waste your time to use other programming languages. also - the post you are replying to isn't condescending. the haskell community just doesn't treat beginners like infants who need coddling. haskellers tend to give the nuanced & truthful answer to questions.
- yladiz 6y ago> haskell is a language for experts. Expert in what? Programming? Lambda calculus? Category theory? Let’s not pretend that you are simply an expert in something randomly, it takes a lot of practice, mistakes, and actually being a beginner before being an expert. Even if you are an expert in the above you still are a beginner when learning Haskell the first time, and you will make mistakes, so having beginner friendly resources is important. Quite frankly, it’s this kind of gatekeeping attitude - that Haskell is meant for “us” and to become one of us, you have to be an expert, and we aren’t going to coddle you - is a kind of attitude that significantly contributes to the lack of good and welcoming beginner resources and causes very few people to actually pick up and stick with the language. You can be a “language for experts” and still have good, beginner friendly learning resources to welcome more into some community.
- rhizome31 6y ago> If you rage quit every toolset that has problems, I have some really bad news for you. As someone who has tried to learn Haskell twice and failed (and trust me I went way beyond the second page of a tutorial ;-), I don't think the issue is that Haskell has problems. As you hinted every language has problems. The issue is that for a lot of people Haskell requires significantly more effort to learn than other languages and doesn't have a lot publicly available software to show off for. So when we learn Haskell and stumble on problems, we are less forgiving than with other languages because we have spent more effort and we don't have enough examples of useful software made with Haskell to reassure us that our efforts will eventually pay off. We loose confidence because it seems that the promises of correctness aren't fulfilled and we don't have enough evidence that we aren't wasting our time. We would need at least to see the light at the end of the tunnel to keep us motivated. The sad thing is that if we decided to spend long hours of our free time learning this language instead of doing other things it's because we really believe in ideas behind it. What we have read about the language obviously speak to us but at some point we loose motivation because we don't get any tangible results. I'm pretty sure that a good part of why it clicks for some people and not others is due to the amount of mathematical literacy. I don't have a strong mathematical background so the amount of effort for me to learn the language is probably much higher than it is for someone better at math. I have to invest more so I expect more in return, which in my personal experience Haskell fails to deliver. To appeal to a wider audience Haskell needs to be pretty much flawless and also to have more public software to showcase.
- tome 6y agoSorry you had a bad experience. Hopefully the Haskell Foundation will be able to put resources into the beginner experience and you will find it easier in the future.
- ghostwriter 6y ago> We loose confidence because it seems that the promises of correctness aren't fulfilled and we don't have enough evidence that we aren't wasting our time. We would need at least to see the light at the end of the tunnel to keep us motivated. Sometimes you go into the tunnels that are not tunnels but rather mines, and you go there not to see the light at the end of it, but rather to dig diamonds.