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 12:30

>>1
Yes, Haskell has that.
/thread

Name: Anonymous 2011-03-08 12:30

SQL.

Name: Anonymous 2011-03-08 12:30

>>2
1/10

Name: Anonymous 2011-03-08 13:03

Name: Descartes 2011-03-08 13:15

OP here,

>>3 yes, but SQL works works on database side, I would like to see it regular programming languages

>>5 thanks, I will take a look at this.

Name: Anonymous 2011-03-08 14:30

>>6
Don't! They're trying to trick you into using a dead language!

Name: Descartes 2011-03-08 14:38

>>7 to late, I'm one of them sine couple of months ;__;

Name: Anonymous 2011-03-08 14:49

>>6
lolol is ur dof ded
U MENA HASKAL

Name: Anonymous 2011-03-08 14:49

>>9
*>>7

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.

Name: Anonymous 2011-03-08 16:36

AND THEY WENT QUITE FAR INTO MY ANUS, FAR ENOUGH TO FIGURE WHAT TO DO WITH BASIC IO FOR EXAMPLE

Name: Anonymous 2011-03-08 16:51

>>11
So... Why was it shelved?

Name: Anonymous 2011-03-08 16:55

>>13
Because you touch yourself at night.

Name: Anonymous 2011-03-08 23:51

>>14
Go away, Peter Griffin.

Name: Anonymous 2011-03-09 10:34

>>13
bump for answer.

Name: Anonymous 2011-03-09 11:00

>>16
Because it turned out to be much harder than they expected, why else?

Name: Anonymous 2011-03-09 11:17

>>17
That may not be the case, though. >>11 said they went far enough to figure out what to do with basic IO, and that's already pretty impressive. He also said "They kinda failed, as it's shelved for now," which means he assumed they failed because it was shelved. I remember reading about some other Microsoft pretty interesting experimental/research projects having their plugs pulled for no apparent reason, which may be due to inefficient results which thus couldn't be integrated into production software with current technology, not necessarily because they were too hard.

Name: Anonymous 2011-03-09 12:21


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