Re: RDF-ISSUE-74: Prefixed names and slashes [RDF Turtle]

Eric,

On 15 Aug 2011, at 13:11, Eric Prud'hommeaux wrote:
> Another argument for escaping is that identifier names (e.g. in
> biology) have things like ':' and '$' in them. Prefixes add a huge
> amount to the readability of SPARQL and Turtle. Forcing a query or
> data writer to abandon the logical prefix because there's an illegal
> localname character is an equally huge impediment to usability.

I don't think you can make a usability/readability argument for allowing this:

    ns0:id\u003D42

as an abbreviation for this:

    <http://example.com/foo/id=42>

These two things could hardly look more different. Anything that *discourages* the use of \u escape sequences is likely to *improve* readability.

> Disallowing escape sequences
> in SPARQL (and maintaining the status quo in Turtle) means we have to
> justify to the users why the escaping rules they can apply to strings
> and IRIs aren't applicable to prefixed names where they'd be most useful.

The justification is that prefixed names are syntactic sugar intended for use with vocabulary terms, which abbreviate just fine without escapes.

> We have a rare opportunity to make these languages more useful,

Useful? What *is* the use case for this? Being able to put more characters into prefixed names is not a use case.

> consistent

Consistent? Yes, but consistency can be sacrificed for other qualities.

> and intuitive.

Intuitive? Not at all.

Option A: “A prefixed name can only contain letters, numbers and a few punctuation chars. For everything else you have to use <angle_bracket_IRIs>.”

Option B: “A prefixed name can only contain letters, numbers and a few punctuation chars. For everything else you have to use \uXXXX escapes. If you don't know/care to do that, then you have to use <angle_bracket_IRIs>.”

Best,
Richard

Received on Monday, 15 August 2011 17:55:21 UTC