[ZPT] Re: v2 of Path Prefixes in CVS

Evan Simpson evan at 4-am.com
Fri Sep 12 21:25:52 EDT 2003


Minor brainstorm -- you may hate it or love it.

Someone (Fergal?) suggested adding parens to the 'call:' prefix syntax. 
  I have to admit that "here/method/call:(x, y)" looks better to me than 
plain "here/method/call:x, y".  It occurred to me that we could do "better".

Suppose we allow prefixed path segments to have the form ":Xarg", where 
X is a punctuation character (other than '/', of course).  This would 
refer to a prefix named 'X' with argument 'arg' -- that is, in the 
expression "here/:#foo" the prefix is '#', in "here/?bar" it is '?', and 
in "here/method/:(x, y)" it is '('!

With this capability, we could define the following (the prefix 
implementation can enforce the matching delimiter in the first three cases):

":(x, y)" == "call:x,y"
":{k}"    == "key:k"
":[1]"    == "index:1"
":=x"     == "var:x"

Too weird?  Too Perlish?  Well, at least it's out of my head.

Cheers,

Evan @ 4-am





More information about the ZPT mailing list