* Sidney Markowitz [2009-09-27 22:13+0200] writes:
Helmut Eller wrote, On 28/9/09 7:21 AM:
First let me say that I have little sympathy for custom readtables. People who use custom syntax are fighting their tools.
Can you say a little more about this? The only time I've used a custom readtable was when I was implementing a custom non-Lisp language for the application that was purpose-designed for the applications and its users, using a custom readtable and macros to translate the application language into s-expressions and then taking it from there in Lisp. One advantage was that user scripts could be compiled into fasls.
I didn't have a problem with the result, but I would like to hear the arguments for doing it a better way if I ever do something similar in the future.
Typical problems with custom syntax:
- it's harder for the compiler to track source locations. Some compilers, e.g CCL, use the reader to mark source expressions with file positions. With custom readtables that's not done.
- many people forget about *read-suppress*
- the editor can't indent the code or it must be told how to do so
- the readtable is part of the compile-time environment and tools like ASDF must be told how to deal with it
- after a month of absence even the author has forgotten how the reader marco was supposed to work
Helmut