Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

I'll take Rust over Haskell all day long. Even though Haskell does rock.


This is because you keep state. You are fallen.


“Church vs state”, an century-old conflict.


Start hopping on rails, enjoy life and see everything going by for the circus it is


I made a lot of money off of Rails but finally switched to Clojure because of the gem pain.

So many gems are C or system wrappers and require very specific versions of Ruby and whatever underlying libraries are called. That's fine on brand new dev projects, but it leads to a lot of unexpected web searches when it's time to ship code or return to a project you haven't touched in 6 months.

Pinning your gems helps with some of this but every time it popped up I thought ugh...here we go again. Eventually that pain made me look for a better way.

One of the oft-undersold features of Clojure is the culture is more careful with breaking changes.


> Start hopping on rails, enjoy life and see everything going by for the circus it is

I thought this might be a quote from the movie Trainspotting (1996). Seems to have a similar spirit to some of the things from that movie.


jump to elixir. enjoy life and get great runtime perf too!


> This is because you keep state. You are fallen.

The Rust philosophy is that there is nothing wrong with mutating state, as long as nobody can ever see you do it. :-)


So Catholicism.


"Forgive me Borrow Checker, for I have sinned"


As always, depends on what you're writing :)


I don't really get what's so good about Haskell.


local reasoning everywhere via lazy evaluation.

Principled abstractions enabling unparalleled composition.

Usable effects libraries like effectful.

Easy concurrency and parallelism.

Fearless refactoring.

stm.


I wouldn't plug effectful here - MTL and few others are usable as well, or not using an effect library at all.


I'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.


Already ADTs do it for me when comparing to other popular languages :)


> local reasoning everywhere via lazy evaluation

Doesn't lazy evaluation mean memory/complexity issues could manifest far away from the problematic code?


occasionally 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.)


Pithy answer: In theory, but very often doesn't matter in practice.

I think the sibling response has a good answer FYI.


I 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?


> 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?


I'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.


What is there not to get? You see, a monad is just a monoid in the category of endofunctors,


It's cos it's all up in that category theory bro.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: