[gambit-list] Strategies on decreasing executable size for Gambit-based software for client distribution

Taylor R Campbell campbell at mumble.net
Sat Oct 4 12:30:51 EDT 2008


   Date: Sat, 4 Oct 2008 08:48:59 -0400
   From: Marc Feeley <feeley at iro.umontreal.ca>

   Sure that could be done.  But then it would change the semantics of  
   your language, in the sense that

       (eval '(map sqrt '(1 4 9)))

   would only "work" if somewhere else in your program you use "map" and  
   "sqrt" *and* the compiler did not inline them (which Gambit currently  
   does).  The semantics of eval would be implementation dependent.   
   Frankly I would find it very hard to use eval reliably.

The mistake here is the exposure of the `current program's global
environment' implied by a unary EVAL, rather than providing access to
that as a feature of the linker.  The linker could have an option for
explicitly reifying the linked program's global environment (or,
perhaps, a collection of modules describing the program) for the use
of the program; then there would be no question about whether it is
safe to exclude certain bindings in the resultant executables or
libraries.



More information about the Gambit-list mailing list