Re: { } and OPTIONAL

Seaborne, Andy wrote:
>
>
>
> Jorge Pérez wrote:

[...]

>>
>> In the same context, what is the necessity of having an Empty Group
>> Pattern? is there a Use Case or Requirement about that?
>
> The empty basic graph pattern can occur so an empty group can occur and
> SPARQL
> should have an explanation for it.  While maybe it's not natural when
> writing
> a query, when commenting out sections of a query for debugging, or
> building
> the query programmatically, it might arise.

I think that (and this is only an idea, not an extremely important
comment) if those are the only reasons to have the empty group pattern in
the language, it's worth thinking in the exclusion of the empty group
pattern and considering it a syntax error. When commenting out sections of
a query for debugging, I think that one may be a little more careful and
comment out the entire group (and not only the pattern inside). A bigger
problem would be that one comment out more than wanted and then if { } is
a syntax error the compiler would help a lot in finding the error. To
programmatically produce { } when building a query, programs must first
have very clear what is the semantics of { }, and then decide if it can be
really useful in the query they are building. Nor semantics nor usefulness
of { } is clear from my point of view. Finally, if using { } is not
natural when writing a query then SPARQL could simply prohibit it.

I think that first the semantics (or may be only the idea) of the Empty
Group Pattern must be proposed and analyzed, then the usefulness of it in
real queries must be discussed, and then (only if it is useful) make the
necessary arrangements in the syntax to support it. I think that this was
the way in all other constructions of SPARQL and it appears to me (sorry
if I'm wrong) that the discussion about the Empty Group Pattern has been
going somehow in the opposite way.

- jorge
>
>>
>> - jorge
>
> 	Andy
>
>
>

Received on Friday, 4 August 2006 16:24:51 UTC