Didier Verna wrote:
> Daniel Herring wrote:
>> I think this would be better implemented in a build system (e.g.
>> ASDF). In fact, the main job of most C/C++/Java build systems is to
>> simply set up the environment for (pass the proper flags to) each
>> compilation unit.
> If you implement this in a build system, well, then you need to use
> that build system for it to work. I'd rather see it implemented at the
> same level that supports handling *readtable* and *package*.
Ok. The times I have wanted something like this, I actually wanted a more
general API, something like :before and :after methods. Register a
function to run after the compilation unit is read, and it could check
that "#if,#endif" style macros were balanced. A function that runs before
LOAD could intercept the path and fetch files on demand.
>> Does this really need implementation-specific support? Wouldn't it be
>> better if it were portable?
> Portability, when it comes to a dozen implementations tops, is not a
> big deal I think.
... Getting this into one implementation (SBCL) will be hard enough.
Then we have to wait a few years for everybody to upgrade. An ASDF
extension could be rolled out much faster, but does have the downside of
If this gains traction, it might be a good idea to do both. Implement the
ASDF extension for quick portability across implementations, and push
implementations to implement the hooks for portability away from ASDF.
> In the meantime, I think a better interface would be
> define-restorable-[variable|parameter]. I'll probably write a CDR for
Yes, writing a CDR will help scope out the goals and requirements.