Live data from Hacker News

Alan Kay on the Meaning of “Object-Oriented Programming” (2003)

purl.org

31–40 of 58 posts

Re: Alan Kay on the Meaning of “Object-Oriented Programming” (2003)

#32
post #3

Towards 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…

The concrete rules I'd give you are in http://en.wikipedia.org/wiki/Object-capability_model -- note that inabilities are important, not just abilities. I'm a great fan of the thesis that's the first reference, which also gets into distributing the model over the network.

I couldn't say if Kay would agree.

Re: Alan Kay on the Meaning of “Object-Oriented Programming” (2003)

#33
post #30

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

He said he did understand before he created Smalltalk.

Can you point to the sentence where he said that?

Re: Alan Kay on the Meaning of “Object-Oriented Programming” (2003)

#35
post #33

Earlier quoted context omitted.

Can you point to the sentence where he said that?

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)

#36
post #13

>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?

Algebra is the study of sets and their operations.

"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
post #13

>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?

Algebra in this context means a system of rules for deciding that two programs (or functions) that are expressed differently, are actually equivalent in the sense that they map equal inputs to equal outputs. I.e. f(x) and g(x) are equivalent if they return the same value for all x.

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)

#38
post #35

Earlier 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.

Yes, Feynman kept telling people to find problems that appeal to them and try to work them out, and not rely so heavily on reading. (One source: Feynman Lectures on Computation.)

Re: Alan Kay on the Meaning of “Object-Oriented Programming” (2003)

#39
post #11

I 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.

He will be here: http://www.erlang-factory.com/sfbay2015 . Hopefully he will share his thoughts.

Re: Alan Kay on the Meaning of “Object-Oriented Programming” (2003)

#40
post #22

Earlier 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.

If the system you are building makes sense, there is probably a reasonable type system that shows it to be well typed.
Post reply on HN