Hacker News new | ask | show | jobs
by knuthsat 1709 days ago
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

1 comments

No, it does not.