3 ms·
Well, classes are types in a language where everything is an object. It's the same in Smalltalk, no?
by coldtea 8y ago
Well, classes are types in a language where everything is an object. It's the same in Smalltalk, no?
- inopinatus 8y agoThat is exactly the category error I am calling out. In a duck-typed language, type is defined by the willingness of a message receiver to receive that message. Class, inheritance, composition are all means to achieve this, but the type of an object is determined by its signature, not its ancestor chain.