This is the mail archive of the guile@sourceware.cygnus.com mailing list for the Guile project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

goops: slot option inheritance question


the following is a question regarding slot options and inheritance in goops.

suppose that:

(define-class <being> ()
  (str #:init-keyword #:str)
  (mag #:init-keyword #:mag)
  (dex #:init-keyword #:dex)
  (vit #:init-keyword #:vit))

(define-class <human> (<being>)
  (str #:accessor str #:init-value 12)
  (mag #:init-value 12)
  (dex #:init-value 12)
  (vit #:init-value 12))

through testing it appears that the slot option:

   #:init-keyword #:str

specified in the definition of the class <being> is not inherited by
the class <human>.  i presume this is correct behavior.  

is there anyway to get slot options to be inherited?  i'd like to
specify some slot options in parent classes and then override and/or
add slot options in inherited classes.

thanks for your time.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]