[gambit-list] Compiling "post-reader" forms?

Nathan Sorenson takeoutweight at hotmail.com
Sun Jun 2 14:06:03 EDT 2013

> There are a few solutions I can think of.  But let me ask this first, can't you simply avoid wrapping the head of special forms and macros?  That location information will be (mostly) ignored anyway.  What matters is the location of the complete expression.

Yes, avoiding wrapping macro symbols is definitely one option. I would like to preserve the ability to do the compilation on the Java VM Clojure side, so I would have to maintain a blacklist of scheme macro symbols and explicitly avoid adding source info to them. I would not be able to introspect gambit's compile-time environment and see which symbols named macros.

One complication is that I provide an "in-line scheme" macro, scm*, for Clojure code,  (similar to c-lambda for in-line C). This would enable users to define and use arbitrary scheme macros, so my macro blacklist would not work here; users might define and use new scheme macros that aren't on the blacklist. I could avoid attaching source macros to any head-position symbols generated via scm*, I suppose... Maybe I will do this for now.

It would be nice if clojure-scheme could indiscriminately tag every form without foreknowledge of what the symbol names. That's why my first impulse was reader evaluation of some sort -- it simplifies the code generation process.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.iro.umontreal.ca/pipermail/gambit-list/attachments/20130602/91d79e67/attachment.htm>

More information about the Gambit-list mailing list