On Wed, 2006-02-15 at 01:14 +0800, William Xu wrote: > Hi people there, > > I try to learn GOOP today. As i don't want to mess with name conficts, i > decided to add a prefix while using any modules. Thus to load GOOPS, > > guile> (use-modules ((oop goops) :renamer (symbol-prefix-proc 'oop/goops:))) > > This seems okay. While, when i try the first example in GOOPS Info, > > guile> (oop/goops:define-method (+ (x <string>) (y <string>)) > (string-append x y)) > <unnamed port>: In expression (add-method! + (method # #)): > <unnamed port>: Unbound variable: add-method! > ABORT: (unbound-variable) > > Type "(backtrace)" to get more information or "(debug)" to enter the debugger. > guile> > > Seems i can't add a renamer for goops module, but make it available on > top-level? While, GOOPS is not built in guile, is it? > > So what's the point here?
The GOOPS macros (e.g. define-method) are not hygenic, and are not evaluated in the defining module, but rather the current one. The Guile module system does not (yet? Perhaps never since r6rs will have an incompatible module system that deals with such things, and there isn't much point to pushing the guile system except for compatibility after r6rs) deal with macros very well. -- http://unknownlamer.org AIM:unknownlamer IRC:[EMAIL PROTECTED] Jabber:[EMAIL PROTECTED] I use Free Software because I value freedom over features. 443E 4F1A E213 7C54 A306 E328 7601 A1F0 F403 574B
signature.asc
Description: This is a digitally signed message part
_______________________________________________ Guile-user mailing list Guile-user@gnu.org http://lists.gnu.org/mailman/listinfo/guile-user