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

Pat Hayes wrote:
>> 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

I may not be following the right link, but I don't see the connection. 
Is there a reference in the archives other than the below?

>> A number of design considerations were laid out in:
>> Draft: open issues around '?' use.
>> http://lists.w3.org/Archives/Public/public-rdf-dawg/2004OctDec/0160

I think this makes some good arguments for using a $ instead of a ?. 
However it doesn't convince me that using both is a good idea. Why are 
two characters considered necessary here? Why not just pick the $ and be 
done with it?

> 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 both).

I tend to think of the distinction between ' and " as one bit of syntax 
sugar XML could do without. Historically, it was probably necessary 
because HTML already allowed it. However, it certainly made the 
proverbial DPH's job harder.

-- 
Elliotte Rusty Harold  elharo@metalab.unc.edu
XML in a Nutshell 3rd Edition Just Published!
http://www.cafeconleche.org/books/xian3/
http://www.amazon.com/exec/obidos/ISBN=0596007647/cafeaulaitA/ref=nosim

Received on Monday, 6 March 2006 11:37:59 UTC