RE: questionable syntax choices for XQuery

> -----Original Message-----
> From: Michael Kay [mailto:mhk@mhk.me.uk]
> Sent: Thursday, April 22, 2004 4:17 AM
> To: 'Xavier Franc'; www-ql@w3.org
> Subject: RE: questionable syntax choices for XQuery
>
> > Some personal remarks about the semicolon separator between 
> > declarations:
> > 
> > - it has been added silently in November (not listed in change list)
> >   that's not nice for implementers...
> > 
> > - I have never understood the necessity of this change.
> >   Is there some subtle lexical issue that I dont see ?
> 
> The syntax can be parsed without it, but it's very hard to 
> produce decent
> error messages and to recover from syntax errors without it. 

Can you elaborate on why this is so?

There are only certain patterns that are allowed in the prolog.  I'm sure
this isn't 100% correct, but here are some of the patterns I've seen.

(: comment-text :)
declare namespace prefix = value;
declare function name(param-list) { expressions };
declare variable name { expression };

Why is including a semicolon after function and variable declarations
useful, but it is not needed after comments?  I don't see how curly braces
are any less definitive to demarcate functions and variables than smilies
are to demarcate a comment.

Ruby is an example of a programming language that doesn't require any kind
of statement terminating character.


-------------------------------------------------------------------------------------
A.G. Edwards & Sons' outgoing and incoming e-mails are electronically
archived and subject to review and/or disclosure to someone other 
than the recipient.

-------------------------------------------------------------------------------------

Received on Thursday, 22 April 2004 08:51:09 UTC