On 8/11/05, Christian christian@pflanze.mine.nu wrote:
I'm wondering why you need that patch.
<snip>
Yes, I could catch the load exception but I don't want to copy and paste that code into every module. Of course I could that module loading form into its own module, but then how do I load that?
Some words about the logic behind the error (from how I see it): load on source code can simply reload the source, there's no implementation problem with that. It does two things, reparse the source (which may have changed), and re-run it's body (which means, perform bindings, thus overwriting bindings which may have changed since after the first load).
Perfectly true and loading a source file multiple times is just fine.
I recognise the inconsistency between loading source multiple times and loading a binary multiple times (with this patch); the former running the body multiple times.
But modules generally pretty quickly reach the point where they stop changing too often and end up compiled. Many of my .scm files will start with something like
(load "srfi-1")
But, if I do that, then I can't ever create a higher level module which imports either srfi-1 itself and a lower module, or imports two lower modules which do.
Questions about design purity are moot while something so simple doesn't work.
chjmodule is a nice bit of code, but is very slow and has far too many bodges necessitated by Gambit's code.
I can understand that people might want load to retain its original behaviour and have this called load-once or some such. If there's any support for this I'll redo the patch.
AGL
Afficher les réponses par date