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

> Needing a PhD in category theory to produce a side effect will no doubt make some other paradigm seem appealing in the future.

I think it’s only really Haskell (and perhaps languages like Idris) that’s super strict on side effects.

In Rust it’s a simple mut annotation, and perhaps a mutex (and you’ll want that in C too of course) if you’re working across threads.



Does rust have Mut annotations on functions?

I mean, when you look at a problem that monads solve with types is that every function has an “annotation “ of what it uses (IO or mutable state). Similar how async in JS allows await, a state annotation would allow put get or IO annotation any of the IO capabilities.

Of course monads are much more but Mut does not look like it pollutes everything with Mut, including function definitions and results


No, it does not.


Effects systems in Scala




Consider applying for YC's Fall 2026 batch! Applications are open till July 27.

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

Search: