xsl-list
[Top] [All Lists]

RE: [xsl] Re: Two "Philisophical" questions about the language

2009-01-30 05:27:21
I've just thought that by the same token there are dangling 
sequence items
in:

for $item in $items return
  expr1, expr2

and in

if (expr) then
  expr1
else
  expr1, expr2


Yes, I agree, the low operator precedence of "," relative to expressions
like "for" and "if" is counter-intuitive and a rich source of coding errors.
Explicit algol68-style closers (end-for, end-if) would have solved the
problem but they don't appear to be a popular solution.

The more you use explicit type declarations, of course, the more likely such
errors are to show up at compile time.

Michael Kay
http://www.saxonica.com/


--~------------------------------------------------------------------
XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list
To unsubscribe, go to: http://lists.mulberrytech.com/xsl-list/
or e-mail: <mailto:xsl-list-unsubscribe(_at_)lists(_dot_)mulberrytech(_dot_)com>
--~--

<Prev in Thread] Current Thread [Next in Thread>