Am Montag, den 22.11.2010, 03:55 -0500 schrieb Felix: > > If I had to deal with a name clash, I'd just put a renamer-module in > > between. > > > > This winds up in *much* less mental effort, than memorising new terms or > > abbreviations for the same argument structure (modulo some type > > replacements). > > > > Given (import (prefix __ X)) I'd encourage everyone to use the most > > generic forms like "fold", "map", "+" etc. for equivalent procedures > > whenever exported. > > (Something I'd love to do for years, but always felt impractical for > > hysterical reasons.) > > > > If that's not what you want, a simple text replacement could provide top > > level definitions which never clash. And for wherever modules are used, > > it's just a matter of a prefix upon import. > > Good point. Yet, it may be very confusing for someone looking at code, > at least for standard bread-and-butter procedures like `map' and > `length'.
Good point again. Possible boilerplate with chicken as it is: (module modx (export + -) (import (prefix scheme s:)) ... (define (x:+ ...) ...) ... (define (x:- ...) ...) ... ;; eventually a block like this (define + x:+) (define - x:-) ) However that could be turned into a feature request: (module modx (export (prefix x: *)) (import (prefix scheme s:)) ... (define (x:+ ...) ...) ... (define (x:- ...) ...) ... ) Where "(export (prefix x: *))" means "all bindings with prefix x:". /Jörg _______________________________________________ Chicken-users mailing list [email protected] http://lists.nongnu.org/mailman/listinfo/chicken-users
