News for hackers. Stuff that matters.
Re:Kay on the Meaning of "Object-Oriented Programming" by seles on Tuesday June 07, 2011 @02:57PM (#2630396)
Another opposite extreme is an OOP language which has no methods. And instead each "method" is really just a data variable which is a closure, making it behave nearly identically to a real method. You could avoid needing these "methods" defined for every instance by simulating inheritance using lexical scoping from a parent class.

Although you would need to provide dynamic scope or pass the first argument as self for it to truly behave like a normal method.

The simplicity of this model is appealing to me but I do not know if any existing languages use it?

There are no comments on this comment yet.