|
[XQuery Talk Mailing List Archive Home] [By Date] [By Thread] [By Subject] [By Author] [Recent Entries] [Reply To This Message] why must one have something inside {} ?Michael Kay mike at saxonica.comSun Dec 4 03:37:13 PST 2011
On 03/12/2011 23:27, David Lee wrote:
> I'm not suggesting "{}" is a 'no-op' I'm suggesting it parses equivalent to
> {()}
> Maybe in the next week or two I'll study the BNF in more detail and make a
> formal suggestion as per Liam's suggestion for XQuery 3.0
>
> So far I haven't seen any reason why it would be either
> 1) Ambiguous
> 2) Cause parser confusion
> 3) Cause reader confusion
> 4) Cause 'unexpected' things to happen
>
>
There are other objections the WG might want to consider: Assigning a
meaning to constructs that are currently disallowed
(a) can make it more difficult to produce good diagnostics for queries
that are actually wrong (ultimately, you end up with the HTML5 situation
where everything you write means something, so there are no compile-time
errors, only run-time errors), and
(b) can "use up" syntactic space that might be needed in the future for
new features. For example, one might want "{}" to represent an empty map
- which is not necessarily inconsistent with this proposal, but in
general, when you give a syntactic construct a meaning you remove the
option of giving it a different meaning in the future.
Michael Kay
Saxonica
|
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
|

Cart








