If the Single Responsibility Principle applies to OOP and smalltalk (&ruby as well) is considered as one of the most OO languages why can Object class respond to so many messages?
Just a few from Object methodDict explore
:
- inspect, explore, browse, print: on:
- accept (visitor pattern on all objects?)
- copy, deepCopy, join, joinTo, at:, at: modify:
- asString, asFunction, asOrderedCollection (why not asSet also?)
- seaside ones: asLink, asJson, asJavascript
It is not object's responsibility (for example user domain model should be interested only in its private messages, payments, etc.)
EDIT: some of them are meaningful (asString, asOrderedCollection, accept, notify) while others seems pretty weird (at:, asFunction, deepCopy, join, joinTo)
Object methodDict
in Seaside (based on pharo smalltalk) image :-) – Ruction