[Top][All Lists]

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

[GOOPS] make class-name a generic?

From: Andreas Rottmann
Subject: [GOOPS] make class-name a generic?
Date: Mon, 23 Feb 2004 15:04:11 +0100
User-agent: Gnus/5.1006 (Gnus v5.10.6) Emacs/21.3 (gnu/linux)


In my code, I define a method on class-name. Since (oop goops) defines
this as a simple procedure, I have to export the generic in my module,
which leads to annyoing warnings about duplicate imports which are
superfluous because the original class-name is still "there", just as
a generic default method. Sample code:

(define-module (foo)
  #:use-module (oop goops)
  #:export (<foo> class-name))

(define-class <foo> ()
  (class-name #:getter class-name #:init-value 'foobar))

(define-module (bar)
  #:use-module (oop goops)
  #:use-module (foo))

(format #t "class-name of <foo> instance: ~S\n"
        (class-name (make <foo>)))
(format #t "class-name of <foo>: ~S\n" (class-name <foo>))

To do away with this warning, I'd have to specify "#:duplicates last"
for *every* module using (foo), because (foo) doesn't make much sense
without (oop goops)).

So, in short: can't class-name be a generic in the first place?

Regards, Andy
Andreas Rottmann         | address@hidden      | address@hidden | address@hidden      | GnuPG Key:
Fingerprint              | DFB4 4EB4 78A4 5EEE 6219  F228 F92F CFC5 01FD 5B62

The best way to accelerate a Windows machine is at 9.81 m/s^2

reply via email to

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