W3C home > Mailing lists > Public > public-rdf-dawg-comments@w3.org > February 2012

Re: Turtle feature request : multi-line comments (was Re: Proposed conventions: System Triplestore, turtle Command, Text Embedded Turtle)

From: Eric Prud'hommeaux <eric@w3.org>
Date: Mon, 13 Feb 2012 12:00:50 -0500
To: Danny Ayers <danny.ayers@gmail.com>, David Booth <david@dbooth.org>
Cc: Semantic Web <semantic-web@w3.org>, Tim Berners-Lee <timbl@w3.org>, Dave Beckett <dave@dajobe.org>, public-rdf-dawg-comments@w3.org, public-rdf-comments@w3.org
Message-ID: <20120213170048.GD20875@w3.org>
The Cc'd lists have seen to requests (attached) for multi-line comments:

  1 * Danny Ayers <danny.ayers@gmail.com> [2012-02-03 18:37+0100]
    > [added cc to dajobe & timbl]
    > 
    > One use case for multi-line (block) comments is mixing text and data
    > notes in the same document and being easily able to separate out the
    > two later (see earlier posts in this thread). When quickly jotting
    > notes the # is inconvenient/ugly and block comments make convenient
    > chunks for extraction.
    > …
    > Would /* and */ be more suitable (as Steve suggested) perhaps..?

  2 * David Booth <david@dbooth.org> [2012-02-08 15:09-0500]
    > Inspired by a post from Danny Ayres
    > http://lists.w3.org/Archives/Public/semantic-web/2012Feb/0031.html 
    > and by my own need, it would be very helpful to have multi-line comments
    > in SPARQL (and Turtle too) such as /* ... */.

Before David Booth's request, the RDF WG asked me to respond to Danny Ayers's proposal by pointing out that there's a strong desire to keep Turtle "copy/past-compatible" with SPARQL. The SPARQL Query language Last Call ended Feb 6:
  <http://www.w3.org/TR/2012/WD-sparql11-query-20120105/>

The demand to finish SPARQL quickly and the value of SPARQL/Turtle compatibility appear to outweigh the demand for multi-line comments. If Danny and David are satisfied with this response, please indicate so in order that both SPARQL and RDF groups may proceed.

Personal comment from ericP: The deployment of Turtle and SPARQL make many people in the WGs reluctant to add features which will break foward-compatibility (using new comments instead of the old ones will break old parsers). IMO, the best way to "break some eggs" is to convince the vendors themselves to extend their implementations with e.g. multi-line comments and then persuade the next editions of the Working Groups to document it as conventional practice.
-- 
-ericP

attached mail follows:


[added cc to dajobe & timbl]

One use case for multi-line (block) comments is mixing text and data
notes in the same document and being easily able to separate out the
two later (see earlier posts in this thread). When quickly jotting
notes the # is inconvenient/ugly and block comments make convenient
chunks for extraction.
(There's also the potential for adding any comments as annotation
triples at parse time, though that's almost certainly best left out of
scope.)

I'm not sure of the impact such an addition might have, I think none
but probably only because I've missed something obvious. Maintaining
validity of existing documents seems an essential requirement. I've no
idea of the situation with N3 - on a quick skim of [1] I couldn't see
references to any kind of comments, not even in the BNF.

Regarding specific syntax, Turtle shares the use of # for single-line
comments and """ for long literals with Python, and Python also
supports """ for comments - but this would be a modal marker, which as
David points out earlier in this thread can cause problems. (and I
also wonder why Turtle doesn't already support this style)

Would /* and */ be more suitable (as Steve suggested) perhaps..?

(Making the markers in Text Embedded Turtle non-modal basically makes
it Turtle with block comments, much better idea :)

Cheers,
Danny.

[1] http://www.w3.org/TeamSubmission/n3/

-- 
http://dannyayers.com

http://webbeep.it  - text to tones and back again

attached mail follows:


Inspired by a post from Danny Ayres
http://lists.w3.org/Archives/Public/semantic-web/2012Feb/0031.html 
and by my own need, it would be very helpful to have multi-line comments
in SPARQL (and Turtle too) such as /* ... */.


-- 
David Booth, Ph.D.
http://dbooth.org/

Opinions expressed herein are those of the author and do not necessarily
reflect those of his employer.
Received on Monday, 13 February 2012 17:01:33 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Monday, 13 February 2012 17:01:34 GMT