Hacker News new | past | comments | ask | show | jobs | submit login

> State monad being fundamentally flawed

Could you explain a bit about what you mean here? In what way is it fundamentally flawed?

I'm not saying you're wrong; I just want to understand.




Basically StateT uses Either to model either the application state or an error. So if your application throws, you lose the current state forever. They sort of painted themselves into a corner with this choice of type, there's no real way out now.

This explains in more detail:

https://github.com/haskell-effectful/effectful/blob/master/t...

I agree loosely with what haskman above says about creating relatively bug free applications, the guard rails are so robust. But those same guard rails mean you can paint yourself into a corner that it is harder to get out of without imperative state, case in point above.




Join us for AI Startup School this June 16-17 in San Francisco!

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

Search: