On May 12, 2009, at 1:23 PM, Michele Simionato wrote:
I have always wanted to extend the meaning of "implicit
phasing" and be able to say
ikarus = implicit phasing + lazy instantiation
ypsilon = implicit phasing + eager instantiation
Just to be clear about lazy vs eager vs the current ikarus
instantiation model, let me present an example (does not
depend on macros or phases or any of that baloney):
#!r6rs
(library (F0) (export f0) (import (rnrs))
(define f0 "f0\n")
(display "F0 initialized\n"))
#!r6rs ;;; script.ss
(import (rnrs) (F0) (only (srfi :something) random))
(define (do-it)
(if (zero? (random 2))
(display f0)
(display "not\n")))
(display "Running ...\n")
(do-it)
(display "Done.\n")
Running script.ss in all *existing* Scheme implementations
randomly produces either:
F0 initialized
Running ...
f0
Done.
or:
F0 initialized
Running ...
not
Done.
but in a lazy instantiation semantics (which Ikarus is not),
it produces either:
Running ...
F0 initialized
f0
Done.
or:
Running ...
not
Done.
I hope this makes it clear so that what Ikarus does is not
mislabeled "lazy". (I don't know what to label it though;
I hate having to give names to things) Also note that I have
nothing against lazy instantiation; I just don't want to have
to implement it (it complicates the compiler and the run-time
system quite a bit).
Aziz,,,