Remix.run Logo
scottmas 7 days ago

So cool! Any languages support STM first class besides Haskell?

hackingonempty 12 hours ago | parent | next [-]

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.

LelouBil 13 hours ago | parent | prev | next [-]

Not "first class" but pretty good in Kotlin

https://arrow-kt.io/learn/coroutines/stm/

vijaysharma12 7 days ago | parent | prev | next [-]

I believe Clojure has first class support for STM.

CGamesPlay 14 hours ago | parent | prev | next [-]

Looks like somebody made a Rust experiment back when Rust was new: https://docs.rs/stm/latest/stm/

lmm 13 hours ago | parent | prev | next [-]

Scala has great STM in the same way (monad-based).

spencerflem 13 hours ago | parent | prev | next [-]

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.

andersa 12 hours ago | parent [-]

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.

cosmic_quanta 7 days ago | parent | prev | next [-]

I think a decade ago or so, people started trying to integrate STM in Pypy

stackghost 13 hours ago | parent | prev [-]

There are c++ libraries that offer it.