4 ms·
> they can be represented by a term and therefore can have a type. It is informative, I see what you mean. Let me try again following your terms: An object is
by mejutoco 4y ago
> they can be represented by a term and therefore can have a type.
It is informative, I see what you mean.
Let me try again following your terms: An object is a type plus behaviour (mutable state).
- grumpyprole 4y agoI am saying that an object has a type, rather than is a type or some augmentation of it. An object is a term-level construction and therefore is not really comparable to a type. Types can be given to both state and behaviour. For example, a function type describes pure behaviour. Note that statically-typed OOP languages have a name for the nominal types of objects: "classes". One could say that a class is a type representing both state and behaviour.
- mejutoco 4y agoFair enough, seems much more correct: A class is a type representing both state and behaviour.