News for hackers. Stuff that matters.
Re:Ruby's Proposed STM by chrisseaton on Friday October 30, 2020 @07:00AM (#24941016)
It’d be good if all writes in a transaction were automatically transactional and we had no TVars, and also if all IO automatically made a transaction irrevocable.

But I’m not sure this is tractable in either implementation effort or runtime overhead.

Re:Ruby's Proposed STM by marcosdumay on Friday October 30, 2020 @03:36PM (#24946047)
Are you talking about the Haskell one?

If so, you can't do IO inside a transaction (it won't compile), and any value not on a TVar is thread-local.

Re:Ruby's Proposed STM by chrisseaton on Friday October 30, 2020 @06:44PM (#24947567)
> Are you talking about the Haskell one?

No?

I'm responding to the idea of the 'colour' of functions and suggesting how I think it should be in Ruby - all side effects transactional, but IO irrevocable. Drop the idea of TVar and make all mutable locations transactional.