Hi Marius, Marius Vollmer <[EMAIL PROTECTED]> writes:
> Hmm. Your approach make 'load' configurable so that it can use > different 'read' procedures. Wouldn't it be more natural to make > 'read' configurable to parse different syntaxes? [...] > However, making the read procedure used by 'load' configurable can't > hurt, I think. Indeed. In fact, this change is two-fold: 1. Have `primitive-load' refer to the `*current-reader*'[*] fluid instead of hard-wiring calls to `scm_read ()'. This way, a Scheme file being loaded can change its reader on-the-fly by doing: (fluid-set! *current-reader* ...) This allows a module to use a different syntax variant, for instance. 2. There are several functions that build upon `primitive-load'. Neil identified them and proposed a way to cleanly integrate them with our modified `primitive-load' while still keeping the "primitiveness" or `primitive-load': http://lists.gnu.org/archive/html/guile-devel/2005-10/msg00116.html Since those `load' procedures are written in Scheme, we can harmlessly have them take an optional `read' argument. Hope this helps, Ludovic. [*] It occurred to me that Neil named the fluid `current-reader' but I think it should really be `*current-reader*' in order to stick to the conventions. _______________________________________________ Guile-devel mailing list Guile-devel@gnu.org http://lists.gnu.org/mailman/listinfo/guile-devel