The modified function actually does guarantee the order of execution: that the code that follows the call to requestProductDetails will always execute prior to the invocation of the continuation parameter.
Making each part of program not rely on the order of execution may seem like a good thing, but it increases the number of required test cases exponentially, if nothing else. Some indeterminacy is inherent in distributed processing; the rest can be determinized.
Oliver Steele lives in Western Massachusetts and commutes to downtown LA, where he is bringing an operating system from handwaving to reality. He was the architect of OpenLaszlo, the author of PyWordNet and other open source projects. His interests include programming languages, knowledge representation, information visualization, and math education. [more]
The modified function actually does guarantee the order of execution: that the code that follows the call to
requestProductDetailswill always execute prior to the invocation of the continuation parameter.Making each part of program not rely on the order of execution may seem like a good thing, but it increases the number of required test cases exponentially, if nothing else. Some indeterminacy is inherent in distributed processing; the rest can be determinized.