RE: questionable syntax choices for XQuery

"Volkmann, Mark" <[email protected]>
Newsgroups gmane.comp.web.query-languages
Message-ID <[email protected]>
> -----Original Message-----
> From: Michael Kay [mailto:[email protected]]
> Sent: Thursday, April 22, 2004 4:17 AM
> To: 'Xavier Franc'; [email protected]
> 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.

-------------------------------------------------------------------------------------
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.