[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: anyone define port types?
From: |
Marko Rauhamaa |
Subject: |
Re: anyone define port types? |
Date: |
Wed, 30 Mar 2016 23:07:10 +0300 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/24.5 (gnu/linux) |
Jan Wedekind <address@hidden>:
> GOOPS supports "open" classes and multiple-dispatch. E.g. you can extend
> the "write" method to control how an object is displayed within the
> Guile REPL [1]. Another interesting approach are multi-methods in
> Clojure which don't even require explicit types for dispatching.
>
> [1] http://wedesoft.de/oop-with-goops.html
Your example demonstrates my problem with GOOPS: you are redefining
(display) by penetrating the black box with (slot-ref). What would
happen to your method if I changed the implementation of <a> so it
no longer has the slot x, even virtually.
GOOPS' has the worst possible object model: objects are seen as mere
data records. The concept of a "slot" is an anathema to OOP.
Think of a UNIX file. You access it through open(2), write(2), read(2),
close(2) and so on. You don't know and you shouldn't care how the file
contents are organized on the disk (if there is a disk!). GOOPS would
like to abandon the system calls and just expose the bytes (slots) on
the disk. Then, GOOPS lets you define any kind of system calls you see
fit.
Marko
- Re: anyone define port types?, (continued)
- Re: anyone define port types?, Nala Ginrut, 2016/03/29
- Re: anyone define port types?, Panicz Maciej Godek, 2016/03/30
- Re: anyone define port types?, Jan Nieuwenhuizen, 2016/03/30
- Re: anyone define port types?, Panicz Maciej Godek, 2016/03/30
- Re: anyone define port types?, Marko Rauhamaa, 2016/03/30
- Re: anyone define port types?, Panicz Maciej Godek, 2016/03/30
- Re: anyone define port types?, Marko Rauhamaa, 2016/03/30
- Re: anyone define port types?, Barry Fishman, 2016/03/31
- Re: anyone define port types?, Marko Rauhamaa, 2016/03/31
- Re: anyone define port types?, Jan Wedekind, 2016/03/30
- Re: anyone define port types?,
Marko Rauhamaa <=
- Re: anyone define port types?, Jan Wedekind, 2016/03/30
- Re: anyone define port types?, Marko Rauhamaa, 2016/03/30
- Re: anyone define port types?, Jan Wedekind, 2016/03/31
- Re: anyone define port types?, Marko Rauhamaa, 2016/03/31