stevo_ wrote:Sorry, but I don't see why this is any different to try.. catch.. finally.
This is built into the language at a low level, and is generic enough to be used in many ways.
How does your system actually make anything different?
While its superficially looks like a try catch block, in the the way it works its very different. We are talking about a transaction here that will commit or fail. About Atomic processes. Its a natural progression from query integration into the language to be able to transact data sources.
So when you transact across something, and it fails, you cant recover from that, and the transaction is declared failed (exec rollback block). If it goes through, then execute the commit code block. the Transact itself will happen in an atomic way, just like transaction happen in SQL Server.
This allows you to write your own resources that can be used in transaction like execution plans.
maybe you don't see a use for it now, because we dont have an abundance applicability. However, there will be in the future, with Transactional Memory, Transactional File System, Transactional Processing with multi-cores.
This is just my suggestion. I am still not sure what the C# team has in store. LINQ was a big step forward, and I like to see C# become better and better as a general purpose programming language.