Request to remove unnecessary semicolons

Please consider the attached a formal request from Mark Logic 
Corporation to remove the need for semicolons.

(Posting from a personal account rather than work account because the 
personal acct has the most spam protection.)

-jh-

Forwarded message 1

  • From: Jason Hunter <jhunter@acm.org>
  • Date: Wed, 21 Apr 2004 09:36:13 -0700
  • Subject: Re: questionable syntax choices for XQuery
  • To: Jonathan Robie <jonathan.robie@datadirect.com>
  • Cc: "Volkmann, Mark" <Mark.Volkmann@AGEDWARDS.com>, "'www-ql@w3.org'" <www-ql@w3.org>
  • Message-ID: <4086A2FD.4030704@acm.org>
  • X-Archived-At: http://www.w3.org/mid/4086A2FD.4030704@acm.org
Jonathan Robie wrote:

> Volkmann, Mark wrote:
>>
>> 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.
> 
> Hi Mark,
> 
> XQuery does not have reserved keywords. This makes parsing more 
> difficult in general, and we want to have a general way to make it easy 
> for the parser to spot the end of a declaration. Therefore, all 
> declarations, including function signatures, end with semicolons. This 
> is easier to remember than requiring semicolons for some declarations 
> but not for others. It's a bit redundant, but you do get used to it.

Which is more important, making parser writing easier or making coding 
XQuery easier?  I believe coding XQuery, because we're going to have 
just some dozen XQuery parsers in the world but thousands or tens of 
thousands of XQuery coders.  The easier we make the language, the more 
coders we'll have.

Empirical evidence shows that the May 2003 syntax is readily parsable (I 
can point to you engines that parse it without ambiguity) so why push an 
unnecessarily nastier syntax down to the thousands of future XQuery coders?

I recognize it's tricky in a WG consisting almost entirely of 
implementors (it was 100% vendors in the meeting I attended) to think of 
what's best for XQuery coders.  The best solution would be to get more 
coders involved, but in lieu of that, we should at least listen up when 
a coder like Mark asks the vendors to make his life easier by 
simplifying the syntax.

-jh-

Received on Wednesday, 21 April 2004 18:56:14 UTC