[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 20:53:05 +0300 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/24.5 (gnu/linux) |
Panicz Maciej Godek <address@hidden>:
> 2016-03-30 13:18 GMT+02:00 Jan Nieuwenhuizen <address@hidden>:
>
>> Panicz Maciej Godek writes:
>>
>> > I also used GOOPS, which I regret to this day, and so the
>> > whole framework needs a serious rewrite
>>
>> What is it that you do not like about GOOPS?
>
> Most specifically, I dislike its middle three letters. The problem
> with OOP is that it requires to know exactly what ones want -- it is
> difficult to change the design of your program after it's been written
> (and it is also difficult to come up with a good design from the
> beginning), and -- since it is based on state mutation - it makes it
> difficult to reason about your program.
>
> On the practical side, it was a bit counterintuitive that <uvec> and
> <vector> were unrelated, and I think that there were some issues with
> <pair> and <list> types.
I like OOP, only I don't like GOOPS. Its classes and generic functions
seem so idiomatically out of place, unschemish, if you will.
This is how OOP ought to be done:
<URL: https://www.gnu.org/software/guile/manual/html_node/OO-Closure.htm
l#OO-Closure>
I have created a tiny Guile module ("simpleton") that generalizes the
principle. In particular,
* You don't need classes for OOP. You only need objects.
* Do tie methods to objects. Don't pretend methods are external to
objects.
* Don't expose the internal state of objects. Only interact with the
object through methods.
Marko
- anyone define port types?, Andy Wingo, 2016/03/28
- Re: anyone define port types?, Matt Wette, 2016/03/28
- 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 <=
- 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, 2016/03/30
- 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