# thinking-together

Steve Dekorte

01/20/2023, 7:08 PM
"Are there any languages with transactions as a first-class concept?" Would be interested to hear the thoughts of folks here on this thread.

Andrew F

01/20/2023, 8:00 PM
"SQL" is not the answer the poster wanted, but arguably the correct one. :D Transactions do figure into my thoughts about language design, and OS/HCI design in general, but I haven't clarified it enough to talk much about it. I'm also very interested in the community's thoughts here.

Mariano Guerra

01/20/2023, 11:17 PM
Clojure and Haskell with Software Transactional Memory?

Jack Rusher

01/21/2023, 8:50 AM
The "predict the effect of this code without running this code" aspect of some of the examples runs afoul of the Halting Problem in the general case. 🤷🏻‍♂️

William HS Angell

01/21/2023, 3:51 PM
Would multiparty session types fit the bill here?


01/25/2023, 9:06 PM
I remember rollbacks being a part of one of the VPRI languages.
I have no thoughts, only links.

Marcel Weiher

01/30/2023, 8:38 AM
Storage Combinators don’t have transactions built-in per-se, but allow for something that’s even better, IMHO: you can build them yourself and then integrate the result into the language in such a way that it is indistinguishable from being built in. At least I am pretty sure it could be done, as I haven’t built that particular piece yet.

Steve Dekorte

02/01/2023, 8:43 PM
I'm very interested in the idea of transactions within a programming language, but I can see some immediate problems with naive approaches (e.g. an error that causes a rollback can't simply apply to the entire program memory or the program would "forget" the error and try it again). So it seems like one would need to add some new system of defining boundaries in which transactions take place and ways of initiating actions or dealing with rollbacks from outside which raises a lot of questions. There's also the issue of state connected to the program in various ways (e.g. sockets, user input) for which rollback is problematic.


02/03/2023, 9:02 AM
Ultimately you need rollbacks where the user is in the loop. I suppose this feature is usually called Undo, and the fancy version is called Version Control. 🐺