8 ms·
Because this is a toy demo that doesn't do anything, in the real world you need much more that than just to do something simple. Also it looks "beautiful" to y
by Thaxll 7y ago
Because this is a toy demo that doesn't do anything, in the real world you need much more that than just to do something simple.
Also it looks "beautiful" to your eye, from a programming perspecting it looks really un-readable if you don't use FP.
https://github.com/Gabriel439/simple-twitter/blob/master/Main.hs#L174 https://github.com/Gabriel439/simple-twitter/blob/master/Mai...
- adrusi 7y agofrom a programming perspecting it looks really un-readable if you don't use FP. I don't mean this as a slight, and I myself am slacking in the same regard, but it's depressing to me that this attitude is so prevalent among professionals. There might be some good engineering reasons that tools like Docker and Kubernetes have much more traction than Nix, but "it's unfamiliar if you don't use FP" is a terrible one. It doesn't require that much investment to become familiar, and there seems to be many fantastic advantages to functional approaches. Why does our industry tolerate this laziness?
- ajdlinux 7y agoI haven't touched FP languages in years, but my first year undergraduate intro programming course was taught in Haskell... FP principles aren't so difficult that the average programmer can't learn them to at least a basic level.
- rimliu 7y agoAnd pretty much any widely used language already provides functional features.
- chongli 7y agobut "it's unfamiliar if you don't use FP" is a terrible one I get the sense that there is a large contingent of programmers who feel disdain for mathematics and FP gets caught in the crossfire. It’s unfair toward both mathematics and functional programming. I would love it if North American culture could adopt a better attitude toward mathematics in general. I think far too many people decide they’re bad at mathematics at some point in high school and never look back. This attitude is far less prevalent in many Asian cultures, where the emphasis is put on hard work instead of talent.
- greggman2 7y agoI know no good math teachers. Most math teachers pre-college don't know the material themselves. I still don't know why something is "efficient with" (a coefficient). And every time I try to get into any math there's 79 unspecified prerequisites I supposedly need to understand all the jargon. 3blue1brown is preaching to the choir AFAIK. I get lost trying to watch his videos as they also expect you already know the material.
- ColinWright 7y ago> I still don't know why something is "efficient with" (a coefficient). I can't parse this - would you care to expand on it? > 3blue1brown is preaching to the choir AFAIK. I get lost trying to watch his videos as they also expect you already know the material. If you care, you can always track back to earlier material and build your knowledge. Most people I know in a similar situation to yours don't actually care, and won't actually put in any effort. And that's a reasonable choice. There are places where math is hard, needs work, and most people have come to a point where they feel that the effort won't be worth it, that the ROI isn't there. But if that's your decision, then own it. If that's not your decision, and you actually want to know more, there are things you can do about it. FWIW, I know a lot of really good math teachers, but I agree that there are also some really poor teachers. If yours were bad then I feel bad about that, although there's nothing I can do about your experience in the education sector. What you do about it now, if anything, is up to you.
- zelos 7y ago> There are places where math is hard... This is the realisation I had (20 years late). Especially beyond high school, maths is hard. You have to put the effort in, and you have to do the example problems. I think its expressiveness and conciseness makes it more dispiriting to study: one page of a maths textbook can contain so much information, and it feels like you're just stupid when it takes an hour to understand that page fully.
- bonoboTP 7y ago
- hota_mazi 7y ago> It doesn't require that much investment to become familiar, It requires a lot of investment to become familiar. I've found this mischaracterization very common among people who are proficient with FP: they forget where they came from, how long it took them to get familiar with all these concepts (the Haskell syntax first, then the FP mindset, then advanced concepts like monoids, functors, applicatives, monads), etc...
- rimliu 7y ago"People are so unwilling to eat soup with forks. Why do we tolerate such laziness"?
- raxxorrax 7y agoLaziness is a potent driver in engineering. I do a lot of I/O and there are arguments against FP in those scenarios. I think imperative programming languages with functional addons often result in better applications from what I have seen. They are also just simpler to write and may net faster code. The assertion that not having in depth knowledge about functional concepts is lazy is lazy.
- pwm 7y agoWhat are the arguments against FP for IO? In my opinion when working with IO in Haskell the explicit tagging and quarantining of IO is super valuable. There is a clear, compiler enforced demarcation so you know when to be careful not to launch those missiles.
- stewbrew 7y agoThis actually actually looks surprisingly readable to me. What I find really funny though is how they use Haskell as a strict language mostly working around its lazy nature with all those do, let etc. constructs. It really makes you wonder if they wouldn't have preferred a strict version of Haskell to begin with. Which is funny of course, given Haskell's propaganda around laziness & pure functional programming.
- lgas 7y agoneither "do" nor "let" impact laziness.
- stewbrew 7y agoNo they don't but they allow to pretend (make it look like) strict evaluation.
- deleted 7y ago[deleted]
- afraca 7y agoThese days Haskell proponents aren't as proud anymore on laziness. Simon Peyton Jones has actually admitted it was a mistake for it to be the default : https://news.ycombinator.com/item?id=1924061 https://news.ycombinator.com/item?id=1924061 Nevertheless, it has its use cases.
- deleted 7y ago[deleted]
- tome 7y agoThat's far from the admission of a mistake.