The difference between object-oriented languages is that instead of saying


You say


The syntactic difference is trivial, but it provides a tool for following good software engineering practice. You want to decrease the former, and increase the latter. It says that f “belongs to” a, along with the other features of a. And by isolating other details about a, you’ve reduced coupling to b, c, and d.

That’s what object-orientation “really” is. You shift focus from the function f to the object a.

That doesn’t necessarily require classes. Many OO languages use classes as a way of describing the features of a, but they’re not required. You can simply promise, “a is the thing that does f”, and that’s all. ActionScript 3.0 is the most prominent example of a non-class-based support for object orientation.

Leave a Reply