-
Notifications
You must be signed in to change notification settings - Fork 8
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Streamline Turtle-star syntactic sugar and future-proof it for graphs #131
Comments
It uses |
But see:
Is that readable, is it easy to spot the difference in meaning? I don't think so. |
Quick note: |
Gosh, it is! But, it's not a problem if a whitespace is mandated behind and before |
I'm not opposed to considering alternatives, but I disagree with this framing. We're trying to align syntax between both data and query languages, and in SPARQL, braces are not used conventionally "reserved for graphs" – they're used to indicate scoping. Also, I agree with Andy about All of the rest of this is obviously subjective preference, but my 0.02:
I find the use of a single symbol to make it harder to read, not easier.
If we're trying to coax people into preferring the reified syntax over the use of triple terms, I find this to be much worse, as both forms use the same characters with the repetition of those characters being the only difference. By contrast, I find it easier to visually differentiate
This is a case where I would much prefer the use of different characters in the token to help visually differentiate from surrounding tokens.
I find the suggestion of using a token including brackets for the annotations to be the most compelling of these suggestions, as it feels naturally aligned with the existing |
Is it? I can't figure out how it would be. Brackets in particular are |
No, you're right, my bad. Square brackets are fairly often allowed by "lax" parsers (and exist in URLs in the wild), but aren't strictly allowed everywhere (reserved for IPv6 literals). However, (I do think |
No, you're right, my bad. Square brackets are fairly often allowed by
"lax" parsers (and exist in URLs in the wild), but aren't strictly allowed
everywhere (reserved for IPv6 literals).
Oops, including this editor's parser apparently :-)
https://editor.notation3.org/s/18aeKV57
(I do think <* *> looks problematic, comparing e.g. <*:s:p:o*> and <* :s
:p :o *>. But that's the bikeshedding aspect of this, beside the technical
points.)
Sorry, why do you think it looks problematic?
…On Tue, Oct 22, 2024, 5:12 p.m. Niklas Lindström ***@***.***> wrote:
Quick note: <*[]:p[]*> is a valid IRI, so the particular <* *> variant is
problematic.
Is it? I can't figure out how it would be. Brackets in particular are
gen-delims, and so belong to the reserved characters.
No, you're right, my bad. Square brackets are fairly often allowed by
"lax" parsers (and exist in URLs in the wild), but aren't strictly allowed
everywhere (reserved for IPv6 literals
<https://datatracker.ietf.org/doc/html/rfc3986#appendix-D.1>).
However, <*():b()*> appears to be valid (parens being sub-delims). OTOH,
that nil isn't allowed in reified triples; right?
(I do think <* *> *looks* problematic, comparing e.g. <*:s:p:o*> and <*
:s :p :o *>. But that's the bikeshedding aspect of this, beside the
technical points.)
—
Reply to this email directly, view it on GitHub
<#131 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AC2PLMEIWUWMQKM5DYLZSP3Z4ZTNLAVCNFSM6AAAAABQMCB5Z2VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDIMRZGU2TQNRYGM>
.
You are receiving this because you commented.Message ID:
***@***.***>
|
@william-vw Two reasons come to mind:
(On that note, We should consider how much leeway we have at this point. There's already been a lot of work on the syntax documents and tests. (I've wanted to debate other options before, e.g. "quoted" predicate-object pairs grouped under a subject. But this can easily become a time sink and shake up settled intuitions. I'm more reluctant to do that now.) |
The |
Agreed. The WG has been proceeding believing that the large majority of uses RDR and RDF-star CG Systems have implemented While the WG is able to make a change, a change to occurrence syntax has a significant impact outside the WG. We don't work in isolation; we work for the community, and the cost should be factored into the decision. |
I'm still struggling to figure this one out, though it's harder. I think the parse would go through these productions:
which would make the appearance of the colon a problem. A colon can appear in a relative IRI, but in this case I think you'd need a I agree with Andy that this is probably a secondary issue since the SPARQL grammar uses the very lax IRIREF production, which in most systems is probably only validated as an IRI later in the parsing process. |
Yes, or it fails the scheme production. There's an online service: https://www.sparql.org/iri-validator.html (It's the old IRI parsing code)
There is also RDF/XML or JSON-LD, where IRIs can be strings passed up by the underlying format parser.
|
It's funny that you mention those two definitions of the meaning of
While this wasn't driving the design idea behind
The questions might well take a lot longer to go away if we keep [0] Implementing Usage Control Policies Using Reification with RDF-Star and SPARQL-Star |
I proposed, tentatively,
It may make it harder to read in certain combinations, but it helps recognition. RDF-star syntax has become quite a bit bloated, with three term syntaxes and one identifier syntax. That is a lot just for the annotation use case. Of course, given that the tendency of the WG is to not map the annotation syntax to
Those two shouldn't occur in the same context. They may, of course, but the design rather distinguishes between Turtle-star (
One argument against the tilde is that it s visually not very strong. I think the
That is actually the issue that I'm most concerned about. |
The point is that while that was the intention, the reality is that usage is overwhelmingly occurrences. |
Yes, that may be a valid point w.r.t. occurrences, and also w. r. t. referential opacity which only very few people seemed to care about. But it may still spark questions and uncertainty. |
The syntax of Turtle-star still needs some work. Grammar updates for triple terms and occurrences.
#51 did fix a few issues, but left others open. In particular:
Different combinations of symbols have been discussed, see e.g. the threads Reified triple syntax and [syntax] some re-shuffling of braces, pipes, etc in the mailing list archive of September 2024. The discussion went on in October in the Re: Reified triple syntax thread.
My latest take on this (from this mail) is:
*
symbol as the unifying character that is used in all things RDF-starThis leads to the following syntactic elements:
<<* :s :p :o *>>
<* :s :p :o *>
**
[* :a :b , :c *]
{* :s :p :o . :x :y :z *}
{{* :s :p :o . :x :y :z *}}
@niklasl collected and investigated examples, some of which I converted to this proposal as UCR with stars. The following is a very short excerpt from there to illustrate the central aspects of this proposal:
The text was updated successfully, but these errors were encountered: