Re:Ditch your (mut)ex, you deserve better
by scottmas on Tuesday November 11, 2025 @07:41PM
(#45894962)
So cool! Any languages support STM first class besides Haskell?
[ Parent
| on HN ]
Re:Ditch your (mut)ex, you deserve better
by cosmic_quanta on Tuesday November 11, 2025 @09:25PM
(#45895720)
I think a decade ago or so, people started trying to integrate STM in Pypy
Re:Ditch your (mut)ex, you deserve better
by vijaysharma12 on Tuesday November 11, 2025 @09:39PM
(#45895819)
I believe Clojure has first class support for STM.
Re:Ditch your (mut)ex, you deserve better
by CGamesPlay on Tuesday November 18, 2025 @02:36AM
(#45962377)
Looks like somebody made a Rust experiment back when Rust was new: https://docs.rs/stm/latest/stm/
Scala has great STM in the same way (monad-based).
Re:Ditch your (mut)ex, you deserve better
by LelouBil on Tuesday November 18, 2025 @03:35AM
(#45962763)
Not "first class" but pretty good in Kotlin
Re:Ditch your (mut)ex, you deserve better
by spencerflem on Tuesday November 18, 2025 @03:42AM
(#45962799)
The new Verse lang by Epic Games & a core Haskell contributor has a lot of transaction features. I don’t know if it’s exactly the same as STM though.
Re:Ditch your (mut)ex, you deserve better
by andersa on Tuesday November 18, 2025 @04:29AM
(#45963076)
Verse only supports single-threaded transactional memory. Epic hasn't yet demonstrated that their approach can actually scale to be used from multiple threads in a useful manner, though they claim that it will.
Re:Ditch your (mut)ex, you deserve better
by stackghost on Tuesday November 18, 2025 @03:45AM
(#45962822)
There are c++ libraries that offer it.
Re:Ditch your (mut)ex, you deserve better
by hackingonempty on Tuesday November 18, 2025 @04:55AM
(#45963213)
Scala supports it with for-comprehensions which are equivalent to Haskell's do-notation but STM is not part of the Scala standard library. Zio and Cats Effect are two popular Scala effects systems with STM.