News for hackers. Stuff that matters.
Re:Alan Kay on the Meaning of “Object-Oriented Programming” ... by galaxyLogic on Sunday March 17, 2019 @11:09PM (#19418429)
Consider JavaScript's "call" if you are familiar with that:

You say somefunk.call (someObject, ...someArgs)

The function executes in the context of 'someObject' meaning it can read and write its fields with expressions like 'this.color = "blue"'.

You could say that somefunk() is a method and you are making a method-call. But it is not a method of 'someObject'. Yet by calling it you CAN manipulate the fields of someObject.

JavaScript is NOT the type of "Message passing/Object-Oriented" system like Smalltalk-80. You can communicate with objects, meaning share information with them, meaning read and write their fields, by means other than their methods only.

There are no comments on this comment yet.