Subj : Re: Adding operator to javascript To : mikhaylov.andrey From : Brendan Eich Date : Wed Aug 31 2005 10:34 am mikhaylov.andrey@gmail.com wrote: > During development i met the fact that i need to add an operator to > javascript which i use as scripting engine in my application. > > The idea is following - i have some transaction manager, but i want to > hide all the details from end-user. I want to create an operator like > transaction > { > ... some code goes here ... > } > which will incapsulate my transaction manager. So the code in the braces will either all complete and commit its effects, or else be rolled back? Transactions sound like an extension to the language and even to whatever host objects the embedding provides (since they will need to support some kind of rollback, or at least invertible operations, or something akin). This is not an operator, in any event. It's new syntax for new semantics. The first thing you could do to help is specify the semantics as completely as you can. /be .