Re: ISSUE-48: Less verbose delete syntax

Going back to Kjetil's original email...

On Wed, Nov 4, 2009 at 1:49 PM, Kjetil Kjernsmo <kjetil@kjernsmo.net> wrote:
> Lets see if I got this right, does this mean that my old verbose example:
>
> DELETE { <foo> dc:title ?o . }
> INSERT { <foo> dc:title "Foo" . }
> WHERE { <foo> dc:title ?o . }
>
> ...would become
> DELETE { <foo> dc:title ?o . }
> INSERT { <foo> dc:title "Foo" . }
> right?
>
> And if I just simply wanted to delete any dc:titles of the <foo>, it'll be
> simply
> DELETE { <foo> dc:title ?o . }
> ?

While I like this syntactic sugar (though I agree with Andy's
suggestion of DELETE WHERE { }), the complexity that has been coming
out of it has me quite concerned, especially for a first pass.

Personally, I'd like to see:
 DELETE WHERE { pattern }

to be the equivalent of:
 DELETE { pattern } WHERE { pattern }

Thereby avoiding the need to write an identical pattern twice.
(incidentally, I wrote "pattern" twice here intentionally, instead of
template/pattern, to indicate that pattern was repeated).

If we have patterns that get extended into filters, optionals, and
unions, then the DELETE template is not the same as the WHERE pattern,
and hence would require the full form of:
 DELETE {template} WHERE {pattern}

Going the way that has been suggested in this thread, it appears that
we are trying to infer a template out of a pattern from a WHERE
clause. This seems excessively difficult, and not possible for a
completely general pattern. The rules of what is and is not legal in
these WHERE clauses, and the analysis to figure it out doesn't seem to
be worth it, IMO.

So to summarize, I'd like to see a "DELETE WHERE" shorthand for simple
deletions where the template and pattern are identical, but not for
anything else. If more is needed, then there's the longer form to work
with.

Regards,
Paul Gearon

Received on Monday, 9 November 2009 17:36:38 UTC