RE: questionable syntax choices

These matters are all rather subjective. We could all dream up symbols we
personally prefer, but experience shows that it's very hard to come up with
alternatives that everyone agrees are an improvement.
 
I think it's much more logical to have a semicolon after everything in the
prolog, rather than having it after some entries and not others.
 
There's no comment delimiter in common use in other popular programming
languages that works for XPath and XQuery. Anthing involving "/" or "*" or
end-of-line or "--" is ruled out for fairly obvious reasons. ("--" is
allowed in XML names, for example).
 
":=" is well-established since the days of Algol 60. It might be ugly, but
it's not new.
 
Michael Kay


  _____  

From: public-qt-comments-request@w3.org
[mailto:public-qt-comments-request@w3.org] On Behalf Of Volkmann, Mark
Sent: 19 April 2004 12:28
To: 'public-qt-comments@w3.org'
Subject: questionable syntax choices



I dove into learning about XQuery this weekend.  While I like what I see, I
think some questionable syntax choices have been made.  Here are three of
them.

1) Why is a semi-colon required at the end of a user-defined function
defintion?  It's clear that the end has been reached when '}' is
encountered.  I don't see how requiring a terminationg ';' makes parsing any
easier.  This is a known gotcha in C++.  I hate to see XQuery borrow a
syntax feature that is already a known issue.

2) Smilies are an odd choice for comment delimiters.  Why choose something
that isn't used by any other common programming languages?

3) Why use ':=' in let clauses instead of simply '='?  You know an
assignment is coming because of the presence of the keyword 'let'.  I don't
see how '=' could be confused for meaning something other than assignment.



----------------------------------------------------------------------------
---------
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 Tuesday, 20 April 2004 04:40:27 UTC