Next: , Previous: , Up: interfaces   [Contents][Index]


10.3 Interfaces type descriptors

Interfaces have run–time type descriptors, accessible through the type-descriptor syntax, Interface type descriptors. Example:

(import (prefix (vicare system type-descriptors)
                td::))

(define-interface-type <Stuff>
  (method-prototype red
    (lambda () => (<top>)))
  (method (blue)
    2))

(define itd
  (type-descriptor <Stuff>))

(td::interface-type-descr? itd)
⇒ #t

(td::interface-type-descr.type-name itd)
⇒ <Stuff>