|
It might not be very clear in the spec and sample implementation, but
if I understand your problem correctly, the answer is that group
escapes group: Say that you have written foo group fie naja this obviously yields (foo (fie naja)). To get (foo (group fie naja)) however, you could write: foo group group fie naja This is because group is only special as the start of a (sub-) block. David A. Wheeler wrote: 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 ------------------------------------------------------------------------- This SF.net email is sponsored by: Microsoft Defy all challenges. Microsoft(R) Visual Studio 2005. http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/ _______________________________________________ Readable-discuss mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/readable-discuss |
signature.asc
Description: OpenPGP digital signature
------------------------------------------------------------------------- This SF.net email is sponsored by: Microsoft Defy all challenges. Microsoft(R) Visual Studio 2008. http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________ Readable-discuss mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/readable-discuss

