guile-devel
[Top][All Lists]
Advanced

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

Re: GNU Guile 2.1.4 released [beta]


From: Jan Wedekind
Subject: Re: GNU Guile 2.1.4 released [beta]
Date: Thu, 15 Sep 2016 21:00:25 +0100 (BST)
User-agent: Alpine 2.11 (DEB 23 2013-08-11)

On Thu, 15 Sep 2016, David Pirotte wrote:

Hi Jan,

Thanks a lot for the work. I am trying to run my project "aiscm" with it.
   I noticed that slots are now objects themselves. So instead of (car <>),
one can use (slot-ref <> 'name). Please let me know if there is a better
way to get the slot names of a class.

     (use-modules (oop goops))
     (define-class <values> ()
       (a #:init-keyword #:a))

     (car (car (class-slots (class-of (make <values> #:a 1))))); Guile 2.0
     (slot-ref (car (class-slots (class-of (make <values> #:a 1)))) 'name); 
Guile
2.1.4

        slot-definition-name

See the '8.8 Introspection' section in the manual

David


Thanks, that works with both versions of Guile :)



reply via email to

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