| PG suggests that foo_bar will be some kind of magic symbol that is really infix syntax to deconstruct into some S-expression on foo and bar but is cautious of introducing any because he doesn't want to run out of special characters My suggestion is to give users the power to define their own 'symbol macros' that hook into the symbol reader and expand into S-expressions. Kind of a way to let users define their own syntax but without it getting too complicated. For example, let's say base symbols are made of letters,numbers and '-' and all the other characters are potentially special characters for symbol macros. Then maybe a notation for defining prefix,postfix and infix symbol-macros ; prefix symbol macro for '.'
(symac .^ ...) ; postfix symbol macro for '.'
(symac $. ...) ; infix symbol macro for '.'
(symac ^.$ ...) Then when the reader reads a symbol it evaluates from right to left expanding symbol macros as it goes ; symbol macros for a java style dotted notation
(symac ^.$
`(get ^ '$)) so a symbol x.y.z expands to (get (get x 'y) 'z) (symac #\$^
`(len ^)) arc>(= x '(1 2 3)
arc>$x
3 (symac ^..$
(range ^ $)) arc> 0..3
(0 1 2 3) You probably get the basic idea. |