[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] Re: Is the semantics of the "or" operator implementat
On 16 September 2014 14:58, Abel Braaksma (Exselt) abel@xxxxxxxxxx < xsl-list-service@xxxxxxxxxxxxxxxxxxxxxx> wrote: > > > > Is the semantics of the "or" operator implementation-dependent? > > > > No, the semantics not, the order of execution is, however, which means > that in error-cases, you can have different outcomes between processors. > This is not different from other languages, in C#, F#, Java, C++ similar > forms of optimization exist. > > Considering '15.7 in the Java Language Specification: Do you have an actual example/experience of some Java expression (logical "or") where different outcomes between processors have been observed? > If you want to deterministically throw an error, use a more predictable > way of writing. I don't think I have ever come across a C++ style of code > like this (and even if you see it, it is considered code smell): > > return a || functionThrowingException() > > Instead, people tend to write: > > return a ? a : functionThrowingException() > Even so, many a QA would not tolerate the required function. -W > > which is the equivalence of the if-then syntax in XPath. > > Cheers, > > Abel Braaksma > Exselt XSLT 3.0 streaming processor > http://exselt.net
|
PURCHASE STYLUS STUDIO ONLINE TODAY!Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced! Download The World's Best XML IDE!Accelerate XML development with our award-winning XML IDE - Download a free trial today! Subscribe in XML format
|