[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Scheme-reports] loading libraries

On Thu, Oct 24, 2013 at 3:33 AM, Michael Montague <mikemon@x> wrote:
Given the follow libraries and program, based on my understanding of
R7RS, the following are all legal outputs from the program. Is this correct?

a b c d program
a b c a b d program
a b c b d program

The libraries may in fact be loaded multiple times,
to allow for models such as Racket which require
clean environments for each library expansion in
order to avoid unwanted macro interactions.

Further, if the bindings of a library are not actually
used then the library may not be loaded ever (an
optimization performed by Chez, at least).  So
you can't reliably import libraries for the sake of
side effects.

Thus the actual regexp for the allowed output is:

(: (* ("abcd") " ") "program")

although I believe in realistic implementations the
worst-case number of repetitions is quadratic in
the size of the library hierarchy.


Scheme-reports mailing list