3 ms·
> 4. A extends B ... can be read as "A is subset of B". I agree, it is unnatural to think of a subset as "extending" the set it is part of.
by Koshkin 4y ago
> 4. A extends B ... can be read as "A is subset of B".
I agree, it is unnatural to think of a subset as "extending" the set it is part of.
- Jtsummers 4y agoYeah, it's a common way of telling people how to read "A extends B", but it's not quite right. The two relationships are related (no pun intended) but they aren't the same relationship. `A extends B` means (in the OO world) that A adds fields, methods, or changes the behavior of methods to B. `A is a subset of B` means that all As are Bs, but some Bs may not be As. It happens that `A extends B` introduces a subset relation between them, but it's not correct to describe it as the same as the subset relation.