Michael Tiedtke <michele.ti...@o2online.de>:

> Nice! What about (define-class <stack> (<list>) ...)? In GOOPS every
> primitive type is (or should be) a class that can be used with
> multiple inheritance. It's enough to (use-modules (oop goops)).

My "simpleton" doesn't have classes. It's *object* oriented, not *class*
oriented.

> Then you're missing /this/, too.

Not at all. It's very present in simpleton:

========================================================================
(define-public (<domain-client> .mux .peer-address)
  (define .this
    (let ((.super (<datagram-client> .mux .peer-address))
          (.opmap (make-hash-table))
          (.next-key 0))

      (define (query domain-name record-type listener xid)
        ; ...

      (define (handle-recv message)
        ; ...

    (make-object .super query handle-recv)))
  .this)
========================================================================

>  But /super/ is missing in my implementation. What should it do with
> multiple inheritance?  How should it know about the inherited
> definitions?

Multiple inheritance is there in simpleton, without classes.

> You're lookup table is just a table. You could use an environment or to
> keep the size of the structure to the ground:

In simpleton, each object has a unique dispatch table.


Marko

Reply via email to