W3C home > Mailing lists > Public > public-rdf-wg@w3.org > June 2011

Re: Two thoughts on Turtle

From: Steve Harris <steve.harris@garlik.com>
Date: Fri, 10 Jun 2011 12:47:17 +0100
Cc: Sandro Hawke <sandro@w3.org>, Andy Seaborne <andy.seaborne@epimorphics.com>, public-rdf-wg <public-rdf-wg@w3.org>
Message-Id: <191815FC-C1F5-4043-91E2-62D341D708E8@garlik.com>
To: Richard Cyganiak <richard@cyganiak.de>
On 2011-06-09, at 10:11, Richard Cyganiak wrote:

> Sandro, Andy,
> On 7 Jun 2011, at 22:48, Sandro Hawke wrote:
>> I think there is a large class of users that would appreciate being able
>> to write:
>>       @prefix <http://xmlns.com/foaf/0.1/>.
>>       [] a Person; name "Sandro Hawke", mbox <mailto:sandro@w3.org>.
>>       [] a Person; name "Ivan Herman". mbox <mailto:ivan@w3.org>.
>> Note that I left out a whole lot of colons.
> Turtle is not the only language that requires unnecessary extra punctuation. Off the top of my head, other examples are XML (unnecessary quotes around attributes), JSON (unnecessary quotes around property names), PHP (unnecessary dollar signs before variables), Lisp (unnecessary parentheses). People complain about it but make do. So I'm unconvinced that getting rid of the colons is worth the effort.
> On 8 Jun 2011, at 14:57, Andy Seaborne wrote:
>> There are important data items that does not have convenient forms : dates and dateTimes.
>> Would it be useful to allow bare dates/dateTimes?
>> :x dc:date 2010-06-08 .
> I would like to see that. It would complete the set of syntactic sugar for the commonly used XSD types, and I'd hope that it'd eventually also make its way into SPARQL implementations. Although there might be problems here; this is valid SPARQL:
>    SELECT (2011-06-09 as ?today) WHERE { }
> but it doesn't do what you think :-)

xsd:date is not an required SPARQL type, but xsd:datetime is, and 2011-06-09T00:00:00Z is not an integer :)

That said, I'm not a parser expert, and I'm scared of things that seem like they ought to be fine, but cause crazy shift-reduce conflicts with sensible future syntax.

SPARQL already caused itself a lot of pain by making WHERE optional, and not allowing "," between clauses e.g. in SELECT and ORDER BY, it makes the project expression syntax grotty, for one.

- Steve

Steve Harris, CTO, Garlik Limited
1-3 Halford Road, Richmond, TW10 6AW, UK
+44 20 8439 8203  http://www.garlik.com/
Registered in England and Wales 535 7233 VAT # 849 0517 11
Registered office: Thames House, Portsmouth Road, Esher, Surrey, KT10 9AD
Received on Friday, 10 June 2011 11:47:59 UTC

This archive was generated by hypermail 2.3.1 : Tuesday, 6 January 2015 22:01:59 UTC