There's one annoying aspect of I-expressions: There is no standard 
representation for the sole symbol "group".  I think I have a solution: Add a 
clarifying requirement to the I-expression definition, requiring that the 
"group" special meaning ONLY takes place if it begins with "G" or "g".

The problem isn't that the word "group" is alphabetic... if it was ! or some 
other punctuation, the same problem would take place.  And the problem isn't 
that you can't EXECUTE an expression to get group's value; `,group works fine.  
And of course, (string->symbol "group") will get the symbol easily enough.  
(well, in Scheme; Common Lisp etc. are similar).

But I really do not like having ANY limitation on basic notation.... there 
should be SOME way to escape things, so that you can get ANYTHING.

So, let's require that the "group" keyword on I-expressions ONLY has meaning if 
it begins with G or g.  Then, if you can escape the text group somehow, you're 
golden.

I plan to REQUIRE in modern-expressions something that many Scheme 
implementations do anyway: ( . x) is evaluated as x.  If you've ever 
implemented a Scheme parser, you'll find that this definition just "pops out" 
naturally (you may have to do extra work to PREVENT this, and why do that?).  
Then ( . group) is exactly the same as group, but it would NOT trigger the 
I-expression interpretation of group.

If your implementation supports other escape mechanisms, like |group| or 
\group, that would also work.  The appeal of (. group) is that it doesn't "use 
up" any other characters; an interpreter can choose to use | as an ordinary 
character, or yet something else, as it desires.

--- David A. Wheeler 

Reply via email to