4 ms·
I don't really get what's so good about Haskell.
by Gordonjcp 4y ago
I don't really get what's so good about Haskell.
- ParetoOptimal 4y agolocal reasoning everywhere via lazy evaluation. Principled abstractions enabling unparalleled composition. Usable effects libraries like effectful. Easy concurrency and parallelism. Fearless refactoring. stm.
- kreetx 4y agoI wouldn't plug effectful here - MTL and few others are usable as well, or not using an effect library at all.
- ParetoOptimal 4y agoI'm unconvinced that suboptimal versions of Haskell such as mtl with it's n+1 instances or very strict interpretations of simple Haskell have the ability to meaningfully move the popularity needle of Haskell forward. With that view it makes since to highlight either "Haskell v2", my ideal flavor of Haskell without reservation, or some mix of the two. There's a time I wouldn't have mentioned effectul for exactly the reasons you allude to, but... I suppose I along with reasons cited, I no longer care that much in a way.
- kreetx 4y agoAlready ADTs do it for me when comparing to other popular languages :)
- didroe 4y ago> local reasoning everywhere via lazy evaluation Doesn't lazy evaluation mean memory/complexity issues could manifest far away from the problematic code?
- whateveracct 4y agooccasionally but usually not the reasoning is about correctness and program behavior Haskell is still the only mainstream language that truly delivers on "understand the part without needing to consider the whole." Others can with work and discipline. With Haskell, you usually have to work hard to get in that level of quagmire (and I've seen and fixed plenty of quagmires. I've seen people complain about code too and just be wrong when I got my hands dirty for like an afternoon.)
- ParetoOptimal 4y agoPithy answer: In theory, but very often doesn't matter in practice. I think the sibling response has a good answer FYI.
- Gordonjcp 4y agoI mean this sounds like a lot of buzzwords, which is usually the answer I get when I ask why I should use Haskell. What would it do to make my life easier?
- ParetoOptimal 4y ago> I mean this sounds like a lot of buzzwords, which is usually the answer I get when I ask why I should use Haskell. That's what makes it a hard sell I guess? > What would it do to make my life easier? It gives those advantages which I'll explain more in a moment everywhere, meaning you can depend on those things in your and others code. Similar to how it's difficult to explain why it's insanely useful that emacs is plain text everywhere. Now let's see if I can demonstrate how just one of these could make your life easier... Local reasoning. A good definition: > Local reasoning is a property of some code wherein the correctness of the code can be inferred locally under specified assumptions, without considering prior application state or all possible inputs. Give me a second to think up a good example. Have a desired language or code example in mind that doesn't use local reasoning?
- Gordonjcp 4y agoI'm not sure I know what local reasoning is. Most of the code I write needs to take in a chunk of floating point data a few thousand points long, do a lot of maths on it, and emit it back out again, as quickly as possible, over and over.
- MrBuddyCasino 4y agoWhat is there not to get? You see, a monad is just a monoid in the category of endofunctors,
- bradwood 4y agoIt's cos it's all up in that category theory bro.