Re: the LHS of OPTIONAL

Lee Feigenbaum wrote:

>Fred Z. and I have both advanced the idea that perhaps SPARQL should 
>require that the LHS of the OPTIONAL be explicitly demarcated by mandatory 
>curly braces. In our opinion (OK, in my opinion, but I'm guessing Fred 
>shares it), this would alleviate any confusion and make complex queries 
>more readable.
>  
>
This is my opinion too.  I do not understand why UNION is a binary
operator that requires curlies on both sides but OPTIONAL is a binary
operator that only requires curlies on one side.  Looking at the grammar,
we do not see the usual stratified BNF for precedence, which in most
languages is used to make parenthesization optional if it can be deduced
by precedence.  I say either introduce a stratified BNF with clear 
precedence
or require curlies on both operands of OPTIONAL.

Fred

Received on Monday, 20 November 2006 17:52:06 UTC