guile-user
[Top][All Lists]
Advanced

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

Re: Message Passing with GOOPS


From: Marko Rauhamaa
Subject: Re: Message Passing with GOOPS
Date: Thu, 25 Jun 2015 12:07:42 +0300
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3 (gnu/linux)

Michael Tiedtke <address@hidden>:

> 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

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