[gambit-list] environment

spir denis.spir at gmail.com
Fri Mar 11 12:46:23 EST 2011


Hello,

Is an environment implemented as plain Scheme data? If yes, is the current 
environment (I mean the set of currently "lookup-able" symbols) accessible? 
Hope I'm clear (don't know yet Scheme's proper vocabulary yet). I'm thinking at 
something along the lines of:
     (getSymbolValue env 'a)
beeing equivalent, for a symbol 'a, to:
     (eval 'a)
and
     (defSymbol env 'a 1)
equivalent to:
     (define a 1)

Aside pure reflexivity, this would allow some nice tricks, like unpaking an 
associative table into the current env:
     (unpack (parseRecord line))
where parseRecord returns eg a (name phone email) table, would def symbols 
under those names in env.

Denis
-- 
_________________
vita es estrany
spir.wikidot.com




More information about the Gambit-list mailing list