[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: namespace of goops module

From: Clinton Ebadi
Subject: Re: namespace of goops module
Date: Tue, 14 Feb 2006 16:12:38 -0500

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.

AIM:unknownlamer IRC:address@hidden Jabber:address@hidden
I use Free Software because I value freedom over features.
443E 4F1A E213 7C54 A306  E328 7601 A1F0 F403 574B

Attachment: signature.asc
Description: This is a digitally signed message part

reply via email to

[Prev in Thread] Current Thread [Next in Thread]