- From: Tim Berners-Lee <timbl@w3.org>
- Date: Sat, 2 Jun 2012 18:19:13 -0400
- To: David Booth <david@dbooth.org>
- Cc: Eric Prud'hommeaux <eric@w3.org>, Danny Ayers <danny.ayers@gmail.com>, Semantic Web <semantic-web@w3.org>, Dave Beckett <dave@dajobe.org>, public-rdf-dawg-comments@w3.org, public-rdf-comments@w3.org
- Message-Id: <EFCE2159-937B-4EC6-8596-DDF91A5AA377@w3.org>
1. I agre that multi-line comments are nice. I also find it a shame that shell and C, and later C-like languages used different comment characters historically. I'm not going to make a big fuss over it. 2. To add multi-line comments would break old parsers seriously, and would break I suspect a very very small number of old documents. Switching from # would break massive number of old documents of course. I don't think the argument about SPARQL computability is very strong, as that occurs within {} blocks only and block comments are IMHO less likely within those blocks, I would expect to find them outside those blocks and line end comments more within the blocks. 3. Block comments may be in many cases deemed inferior to strings. And you have multi-line strings. In both python and N3 derivatives (sparql, turtle, etc) I have picked up the meme that if something is worth block commenting its worth adding a string to the system instead. in Pythion, don't write # This python program calculates the date of Easter # # Use it like this # # python easter 2007 # def main: whatever Write __doc__ = """ This python program calculates the date of Easter. This python program calculates the date of Easter Use it like this python easter 2007 """ def usage: print __doc__ def main: whatever In N3 etc don't write # To-Do list ontology # # This ontology should give you all # the terms you need for doing all kinds of cool things with to-do lists. # bla bla blah ... # # but write @prefix s: <http://www.w3.org/2000/01/rdf-schema#> . @prefix owl: <http://www.w3.org/2002/07/owl#> . <> a owl:Ontology; s:title "To-Do list Ontology"; s:comment """# This ontology should give you all the terms you need for doing all kinds of cool things with to-do lists. bla bla blah ... """ . For this reason I have my editor color comments red and strings green, as a gentle reminder to me. It would be good for style guides to point this out. Ontology authors certainly should be very suspicious od any block comments, but also people inputting random stuff about their CD collection or whatever in N3. It's a pattern I guess. Maybe it has a name already. Hoping the mail system preserves the indentation above for you Tim
Received on Saturday, 2 June 2012 22:19:24 UTC