Why Alan Kay came up with object-oriented: I wanted to get rid of data. I didn't understand the monster LISP idea of tangible metalanguage then
Alan Kay on the Meaning of “Object-Oriented Programming” (2003)
31–40 of 58 posts
Re: Alan Kay on the Meaning of “Object-Oriented Programming” (2003)
#32Towards the end: But just to show how stubbornly an idea can hang on, all through the seventies and eighties, there were many people who tried to get by with "Remote Procedure Call" instead of thinking about objects and messages. Sic transit gloria mundi. Can somebody explain to me what distinction he's drawing here? What's the issue with RPC that's solved by Objects+Messages?
I wish you hadn't asked this question b/c it sent me on a wild goose chase, mainly as I tried to reconcile my understanding of OOP vs. Kay's version of it, of which I'm still unclear. I perused the [1] he mentions to try and get better insight. (My version is much more born out of my history w/ C++/Java.) Kay says, OOP to me means only messaging, local retention and protection and hiding of state-process, and extreme…
I couldn't say if Kay would agree.
Re: Alan Kay on the Meaning of “Object-Oriented Programming” (2003)
#33Re: Alan Kay on the Meaning of “Object-Oriented Programming” (2003)
#34Re: Alan Kay on the Meaning of “Object-Oriented Programming” (2003)
#35Earlier quoted context omitted.
Can you point to the sentence where he said that?
First sentence of the next paragraph.
If what you are working on originally looks understandable, you should be alarmed.
Re: Alan Kay on the Meaning of “Object-Oriented Programming” (2003)
#36>My math background made me realize that each object could have several algebras associated with it, and there could be families of these algebras Could someone explain what he meant here?
"High school algebra" is usually limited to the study of real numbers and the operations of addition and multiplication.
In upper division undergraduate mathematics, you learn about other kind of algebras. For example, there is the set of regular polygons with operations such as rotation and reflection.
In OO, a class of objects defines the operations (methods) that are valid, and thus, a class is an algebra, and a set of classes is a family of algebras. I suppose that you would need a form of multiple-inheritance in order to have a family of algebras for an object.
Re: Alan Kay on the Meaning of “Object-Oriented Programming” (2003)
#37>My math background made me realize that each object could have several algebras associated with it, and there could be families of these algebras Could someone explain what he meant here?
The algebra of arithmetic is the most familiar, and it lets us determine that f(x) = 1 + (1 + (1 + x)) is equivalent to g(x) = ((1 + 1) + 1) + x for any integer x. In this case, the relevant algebraic law is associativity.
One abstract way to think about integers is as sets of equivalent arithmetic trees, so "3" is a stand in for the set {(1 + 1) + 1, 1 + (1 + 1)}.
Other kinds of objects that can appear in a program can have similar kinds of equivalences under various operations.
As a less familiar example, take axis aligned bounding boxes. Translation and scaling both map an axis aligned bounding box to another axis aligned bounding box. Intersection maps two bounding boxes to one smaller bounding box. "Convex closure" maps two bounding boxes to a larger bounding box--specifically, the smallest bounding box that encloses both of them.
There are then various algebraic laws that let us determine that differently expressed combinations of these operations are in fact equivalent.
If "∧" represents intersection, and A, B, and C are bounding boxes, then f(A, B, C) = (A ∧ B) ∧ C and g(A, B, C) = A ∧ (B ∧ C) are equivalent because intersection is associative.
If we apply the same translation to two bounding boxes and then form the intersection of the results, this is equivalent to intersecting the boxes, and then translating the results.
There are also interesting equivalences that relate intersection and closure.
This kind of broadly construed "algebraic" manipulation can be used to rewrite one program into an equivalent program that executes more efficiently, and this is one way of thinking about what an optimizing compiler is doing when it optimizes a program.
Re: Alan Kay on the Meaning of “Object-Oriented Programming” (2003)
#38Earlier quoted context omitted.
First sentence of the next paragraph.
Thanks. I still find it fascinating people do good work without fully understanding an area. It's as if you're not supposed to. I wonder if this could be used as a guiding principle in making things. If what you are working on originally looks understandable, you should be alarmed.
Re: Alan Kay on the Meaning of “Object-Oriented Programming” (2003)
#39I wonder what he thinks of Erlang, as it's very much about message passing, hiding of process state, and late binding. Of course, this is built at a higher level and it's not turtles all the way down: you don't send messages to numbers to do basic math.
Re: Alan Kay on the Meaning of “Object-Oriented Programming” (2003)
#40Earlier quoted context omitted.
So what specifically about OO gets so much better as soon as you take types away? Can you give a specific improvement?
Ability to change or replace object instances (maybe with instances of different types) on the fly could be an example. In general, you can design incredibly dynamic and reconfigurable systems. Whether you want to or not, and at what level should you stop doing it, is certainly a good debate to have.