[prev in list] [next in list] [prev in thread] [next in thread] 

List:       xsl-list
Subject:    RE: [xsl] Re: Two "Philisophical" questions about the language
From:       "Michael Kay" <mike () saxonica ! com>
Date:       2009-01-30 10:26:55
Message-ID: 8F6A0313E1BC430BA917550B9AF12042 () Sealion
[Download RAW message or body]

> 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@lists.mulberrytech.com>
--~--

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic