Re: "Simple Lists" (was Re: ISSUE-77: Should we mark rdf:Seq as archaic (cf ISSUE-24))

On Sun, 2011-10-16 at 20:13 -0500, Pat Hayes wrote:
> How about adapting some kind of bracketing convention, maybe [[ a b c
> ]] for a list with three items, and having SPARQL treat [[?x]] as a
> variable list, ie it is required to match a (wellformed, simple,
> proper) list? That seems very intuitive to me. 


How about Prolog lists:
   [] is the empty list
   [a,b,c] is the list of a, b, and c
   [a|x] is the list with a first of a and rest of x
   [a,b,c|x] is the list with the first being a, second
             being b, third being c, and the rest being x
Now, in Prolog you never need it, but it seems simple
enough to imagine  [|x] would be the list x, which differs 
from x in that it's forced to be a list, which is what we wanted here.

Turtle/SPARQL use (a b c) instead of [a,b,c]; I'm not sure if "|" is
still available to use this way or not.

A simpler approach would just be to rev the results format, with some
element in the protocol indicating you can handle the 1.2 results

    -- Sandro

Received on Monday, 17 October 2011 03:27:57 UTC