2 ms·
This article is too loose in throwing around terms. I'm pretty sure the title should be 'Classes Are Not Abstract Data Types'. An 'object' in the OO sense is a
by dnewcome 17y ago
This article is too loose in throwing around terms. I'm pretty sure the title should be 'Classes Are Not Abstract Data Types'. An 'object' in the OO sense is a separate (albeit related) concept from a 'type' (class). OO is about behavior, not data. If that behavior is tied to an implementation, that is more of a design fault in the program than the language. We have always had abstract classes in c++, and we have interfaces in Java/.NET. The idea of separating the interface from the implementation is not something that we have been overlooking for the past 30 years as the author indicates. Maybe I'm missing something, but having the ability to define the data of a type separately from the behavior seems like a step back toward c structs with static methods to operate on them. The only difference is that you can group your methods into what should probably just be a class rather than a 'protocol'.