W3C home > Mailing lists > Public > public-rdf-dawg-comments@w3.org > March 2006

Re: Comment: don't use ? and $. Pick one. [OK?]

From: Pat Hayes <phayes@ihmc.us>
Date: Sun, 5 Mar 2006 21:14:47 -0800
Message-Id: <p06230911c031745661ac@[]>
To: Elliotte Harold <elharo@metalab.unc.edu>
Cc: Dan Connolly <connolly@w3.org>, public-rdf-dawg-comments@w3.org

>On Sun, 2006-03-05 at 18:56 -0500, Elliotte Harold wrote:
>>  If there's a justification for using both $ and ? to represent
>>  variables, I haven't found it yet.
>The WG made that choice in the course of resolving the
>punctuationSyntax issue.
>  http://www.w3.org/2001/sw/DataAccess/issues#punctuationSyntax
>A number of design considerations were laid out in:
>Draft: open issues around '?' use.
>>   I haven't finished reading the spec
>>  yet, so I could be missing it; but just looking at the BNF, I don't
>>  think there's any significant difference.
>Indeed, there is none.
>>  If this is true, then I strongly urge the working group to pick one.
>>  personally I prefer the dollar sign. It's not a reserved character in
>>  URLs and it's already used to indicate variables in other languages such
>>  as PHP. However this isn't a strong preference. I could certainly live
>>  with a question mark.
>>  However I feel having too makes the language pointlessly complex, much
>>  harder to read, and harder to learn. It increases the size of the spec,
>>  increases the size and complexity of the grammar, and reserves an extra
>>  character that must now be avoided.

Just a quick clarification: it does not reserve two characters, which 
is one of its strengths. If you have a variable name beginning with 
'?', then prefix it with '$', and vice versa. XML uses a similar 
trick with the single and double quote option, which allows quoted 
strings containing either single or double quote characters (but not 

Pat Hayes
IHMC		(850)434 8903 or (650)494 3973   home
40 South Alcaniz St.	(850)202 4416   office
Pensacola			(850)202 4440   fax
FL 32502			(850)291 0667    cell
phayesAT-SIGNihmc.us       http://www.ihmc.us/users/phayes
Received on Monday, 6 March 2006 05:15:08 UTC

This archive was generated by hypermail 2.3.1 : Tuesday, 6 January 2015 20:52:07 UTC