w3c / rdf-concepts

https://w3c.github.io/rdf-concepts/
Other
16 stars 2 forks source link

Confusing example of distinguishability of IRIs and literals #72

Closed jyasskin closed 1 year ago

jyasskin commented 1 year ago

https://www.w3.org/TR/rdf12-concepts/#section-triples has

IRIs, literals, blank nodes, and quoted triples are distinct and distinguishable. For example, http://example.org/ as a string literal is equal to neither http://example.org/ as an IRI ...

When I first read this, I looked up the definition of IRI, found "An IRI ... is a string" and thought this was a discriminated union where someone had forgotten to tag the components. In fact, I should have looked up the definition of literal and discovered that "http://example.org/ as a string literal" meant the pair ("http://example.org", "xsd:string"), which is clearly different from the IRI/string "http://example.org/".

I'd suggest updating this example with an indication that literals include their types, so something like

... For example, http://example.org/^^xsd:string as a literal is equal to neither http://example.org/ as an IRI ...

hartig commented 1 year ago

@jyasskin see PR #73 -- or directly in the following preview of that PR: https://pr-preview.s3.amazonaws.com/w3c/rdf-concepts/pull/73.html#section-triples