Re: RDF-ISSUE-89 (at-prefix): Should Turtle allow SPARQL's PREFIX like @prefix? [RDF Turtle]

On 2012-05-10, at 22:59, Sandro Hawke wrote:

> On Thu, 2012-05-10 at 19:53 +0100, Richard Cyganiak wrote:
>> Sandro,
>> 
>> I'm sitting on the fence regarding @prefix, and don't like the barewords idea.
>> 
>>> But when I imagine introducing new people to Turtle, as I expect to be
>>> doing for many years once it becomes a Recommendation, I can't think of
>>> any way to justify that odd character.
>> 
>> It's not just the initial @, also the trailing period. Turtle has:
>> 
>>   @prefix foaf: <http://xmlns.com/foaf/0.1/>.
>> 
>> SPARQL has:
>> 
>>   PREFIX foaf: <http://xmlns.com/foaf/0.1/>
> 
> Indeed, I forgot about that, and Eric reminded me earlier today.  Yes.
> 
>> The period is actually a bigger problem than the @, IMO.
>> 
>> On the other hand, someone who has to learn a completely new language 
> 
> My sense is that people moving between Turtle and SPARQL wont think of
> it as a completely new language.   Particularly if they learned SPARQL
> first, then Turtle is effectively just a subset of Turtle.   But in
> either case, I think it will often seem like one language, where SPARQL
> just involves using a bunch of extra features of the language.
> 
>> won't be bothered greatly by one extra character here or there, IMO. It's rare that newbies point out inconsistencies in the grammar of a new language that they learn.
> 
> I suppose that depends a lot on the context.   In a SemWeb context,
> they're often learning so much other stuff --- well, things like
> httpRange-14 draw a lot more heat than @prefix, it's true.
> 
>> The same argument that you make for @prefix can be made for @base. Do you suggest changing @base too?
> 
> Yes, absolutely.   
> 
> I might phrase it now as:
> 
> PROPOSED: Make the @-sign and period optional on 'prefix' and 'base' in
> Turtle

That is an option - but it may be less confusing to allow exactly either:

@prefix foo: <http://foo.example/> .   [N3 style]
   or
PREFIX foo: <http://foo.example/>      [SPARQL style]

You can't put a . between PREFIXes in SPARQL, and I don't think we should add that as an option, it wouldn't fit with the rest of the language.

I'm kind of ambivalent about this, it's probably a good idea, but I've never heard a complaint about it.

- Steve

-- 
Steve Harris, CTO
Garlik, a part of Experian
1-3 Halford Road, Richmond, TW10 6AW, UK
+44 20 8439 8203  http://www.garlik.com/
Registered in England and Wales 653331 VAT # 887 1335 93
Registered office: Landmark House, Experian Way, Nottingham, Notts, NG80 1ZZ

Received on Friday, 11 May 2012 10:49:12 UTC