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

> it lets you separate your exception handling logic from the mainline logic of the function

So do the error monads (on Rust or Haskell). In fact, they offer a lot more flexibility on how to separate them, and can put even more distance between the happy path and error handling (if you need it, often people use the extra flexibility to place them closer).



But now, instead of worrying about errors, you're worrying about pleasing the type checker all the time.


You mean, handling all the corner cases and making sure your code is correct?

There are moments when the experience of programing in Haskell feels like "pleasing the type system". Those are few and far in between, and most times they are still because of a bad error message that converted your bug into a complex type error.

If your experience on the language gets those all the time, I suggest you get some more experience, because you are clearly still unable to design your types very well.


> If your experience on the language gets those all the time, I suggest you get some more experience, because you are clearly still unable to design your types very well.

It's possible to advocate for Haskell without casting aspersions on someone's abilities.


Sorry, it gets tiresome to hear the "tried Haskell once, types are a huge problem" claim again and again.

The language does have a steep learning curve, and it's no personal flaw to not get it even for a long while. But to go on and complain that the language is badly done because they couldn't get it on the first few tries is a deeply annoying display of hubris.


I can sympathize.




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

Search: