[Top][All Lists]

[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: Thu, 31 Mar 2016 01:44:18 +0300
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.5 (gnu/linux)

Jan Wedekind <address@hidden>:

> On Wed, 30 Mar 2016, Marko Rauhamaa wrote:
>> GOOPS' has the worst possible object model: objects are seen as mere
>> data records. The concept of a "slot" is an anathema to OOP.
> Ok, I have updated the example to use accessor functions instead of
> "slot-ref".

(get-x) is only a fig leaf for (slot-ref). In general, no user of an <a>
object should think the object holds a piece of information called x.
Instead, you should be interacting with the abstract object <a>.

Python people call it duck-typing.

Java, Go et al use interfaces.

Even C can do opaque structs.

C++ suffers from "private" data members, and GOOPS strips away even that
thin veil.


   [...] during her journey south to be married, the young queen-to-be
   passed through a town that was famed for its silk stockings, then
   rare and expensive items. Wishing to show her due courtesy, the
   merchants of the town offered to present her with a pair. [...] The
   Queen’s courtiers were aghast at this embarrassing breach of decorum,
   regarded as both indecent and audacious, and one replied loftily that
   “The Queen of Spain has no legs”.


reply via email to

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