On May 25, 2009, at 3:49 PM, Abdulaziz Ghuloum wrote:

No.  I just want to make sure that I'm not doing "the wrong thing"
and that people have to go out of their way to fix it.  This is why
we're having this discussion---just to be sure.

Looking further into this, there appears to be two problems, one
is benign and one is more serious.

The first one is that the current structure of the compiler would
result in compiling the library code twice: once for use in the
running program and once for serialization.  This would result in
compile times taking twice as long as before, which is bad.  This
minor problem is in Ikarus itself and can be solved in a number of
ways, so, it's not a show stopper (it will just take some time to
fix).

The second problem is a little more serious.  When libraries are
compiled and cached automatically, there is a danger that users
may not be aware of this behavior and its full implications and
would mistakenly presume that libraries are loaded from source
every time only to realize (after some serious head scratching)
that ikarus is using a cached copy and not the source.  One
example of this situation is using a library that "include"s the
contents of another file in its body.  If libraries are loaded
from source, modifying the included file is not a problem.  But
if ikarus uses a previously cached instance, the library would
behave the same no matter how much the included file is changed.

This problem (libraries that should be recompiled depending on
external factors) is already present in ikarus of course, but it
gets more serious if all libraries are cached automatically and
without regard to these external factors.  Unfortunately, there
is no automatic way of deriving all such dependencies, and this
results in brokenness of all libraries whose compilation (macros)
depend on files, environment variables, databases, command-line
arguments, et cetera.

Now Ikarus can provide the means for the user to specify such
external dependencies (for example, an include macro that records
the file modification date at include time and checks for it at
library load time), and this is what I've been working on today.
But the fact remains that caching can have surprising results
unless the user is fully aware of its consequences.

Just another data point.

Aziz,,,

Reply via email to