Return Styles: Pseud0ch, Terminal, Valhalla, NES, Geocities, Blue Moon. Entire thread

transaction in regular programing language

Name: Descartes 2011-03-08 12:26

Hi,

in databases transaction is quite popular term, but I'm wondering, why in programming language we don't have them build in? I think this could be useful, making error handling easier, from other it could be also performance problem.

It could wok in that way: you create start label in code, and further end label, if something wrong will happend, all actions will be undone and execution would move to end label (where you could write some checking code).

Try/catch construction looks similar, but it's not the same.

Is this implemented on the language level somewhere? Could this be implemented in an elegant way in popular languages?

Name: Anonymous 2011-03-08 16:11

>>6
You might also want to read that post-mortem from the Microsoft Research dudes trying to bring STM to .NET. They kinda failed, as it's shelved for now, but they've set a much higher target than what Haskell does: they wanted to have unrestricted imperative code in transactions, plus whatever calls to external stuff with transaction support, databases, filesystem, transactional DCOM or whatever it's called, all that things.

And they went quite far into it, far enough to figure what to do with basic IO for example.

Newer Posts
Don't change these.
Name: Email:
Entire Thread Thread List