2 ms·
> 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 Haske
by nicoburns 5y ago
> 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.
- knuthsat 5y agoDoes 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
- lalaithion 5y agoNo, it does not.
- whimsicalism 5y agoEffects systems in Scala