|
From: Hoehle, Joerg-C. <Joe...@t-...> - 2005-06-13 15:20:47
|
Dan Cohen wonders: >Is there some reason these do not execute only once? 1. the current behaviour is explicitly covered by the CLHS. "If the same list (load-time-value form) is evaluated or compiled more than once, it is implementation-dependent whether form is evaluated only once or is evaluated more than once." However, "Implementations that implicitly compile (or partially compile) expressions processed by eval might evaluate form only once, at the time this compilation is performed." CLISP is not such an implementation, so it's behaviour is not covered. 2. Yes, indeed, why not?! Then I'd have a better feeling about recommending load-time-value for FFI stuff in CLISP, since it's valuable for compiled code and would not be stupid in interpreted code. OTOH, caching it seems reminescent of DMD, aka. long deprecated displace macros (they modified the source code's s-exp list representation). I'm actually unsure about how to realize a caching load-time-value in the interpreter. I don't know whether a per-load/compilation-unit weak-key EQ hash-table would be TRT. Support for interpreted mode is important in CLISP for as long as using interpreted code is the recommended way to debug code (or to get useful information inside the debugger). Regards, Jorg Hohle |