Jan Wedekind <j...@wedesoft.de>: > 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. Remember: [...] 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”. <URL: http://www.worldwidewords.org/qa/qa-que2.htm> Marko