Egil Möller:
>  Hm, I wonder if your layered approach could be taken further - basicly
starting with an extensible I-expression reader with indentation-aware
reader-macros, and a nice way to register multiple such macros without
them needing to know about each other, and use those to implement modern
expressions?

Maybe.  Though actually, it's not to bad as-is.  "sugar" replaces the current 
read, and then calls read when it's done.  By doing replacements in the right 
order, they end up layering quite easily.

Unfortunately, I _had_ to end up implementing the entire "read" function for 
Scheme, and that wouldn't be aided by another layering approach (it would just 
change where the re-implementation occurred).  Scheme doesn't have Common 
Lisp's readtable, or anything like it, so there's practically no control over 
what read does short of replacing it.  It may be just as well; Common Lisp's 
readtable turns out to be "not quite what you want" anyway - it lets you 
control what happens from some character on, but not note state from previous 
characters.  So distinguishing "f (a)" from "f(a)" is not trivially done with 
readtables (you can do it, but you end up doing lots of other things to get 
there).

--- David A. Wheeler



-------------------------------------------------------------------------
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

Reply via email to