Live data from Hacker News

Alan Kay on the misunderstanding of OOP (1998)

lists.squeakfoundation.org

181–190 of 212 posts

Re: Alan Kay on the misunderstanding of OOP (1998)

#181
post #178

Earlier quoted context omitted.

Regarding the internet (and the design of TCP/IP in particular), here's a comment by Alan from his recent AMA: https://news.ycombinator.com/item?id=11960130 One interesting point from a talk of his - the internet has never broken or been unavailable since they turned it on, even though it has gone through about 3 successive generations of hardware/software.

So the idea, essentially, is that TCP/IP is like a "free form field" where people can write whatever they want, and then everyone is free to create their own structure on top of that, to suit their needs. In contrast to some protocol that accepted only, say, XML? His point, then, is that not forcing such structure was a crucial ingredient in the internet's success?

The TCP messaging analogy here is that the design was a protocol, which focused on how different components in a TCP system communicate with each other. Rather than a design that focused on how each component worked internally.

The inter-communication was the central design, not the intra-communication.

Many OOP programmers today spend the bulk of their time thinking about how their objects should work rather than how they should communicate.

Re: Alan Kay on the misunderstanding of OOP (1998)

#182
post #178

Earlier quoted context omitted.

Regarding the internet (and the design of TCP/IP in particular), here's a comment by Alan from his recent AMA: https://news.ycombinator.com/item?id=11960130 One interesting point from a talk of his - the internet has never broken or been unavailable since they turned it on, even though it has gone through about 3 successive generations of hardware/software.

So the idea, essentially, is that TCP/IP is like a "free form field" where people can write whatever they want, and then everyone is free to create their own structure on top of that, to suit their needs. In contrast to some protocol that accepted only, say, XML? His point, then, is that not forcing such structure was a crucial ingredient in the internet's success?

Well, TCP/IP was just about the mechanics of getting 2 machines to be able to communicate with each other. He hints at the end of that comment on how to expand that to include meaning and interpretation of the actual message. One way of thinking about it - how would we communicate with an alien civilization? In a way that's how 2 machines that never interacted before could negotiate common meaning.

Re: Alan Kay on the misunderstanding of OOP (1998)

#183
post #178

Earlier quoted context omitted.

So the idea, essentially, is that TCP/IP is like a "free form field" where people can write whatever they want, and then everyone is free to create their own structure on top of that, to suit their needs. In contrast to some protocol that accepted only, say, XML? His point, then, is that not forcing such structure was a crucial ingredient in the internet's success?

Well, TCP/IP was just about the mechanics of getting 2 machines to be able to communicate with each other. He hints at the end of that comment on how to expand that to include meaning and interpretation of the actual message. One way of thinking about it - how would we communicate with an alien civilization? In a way that's how 2 machines that never interacted before could negotiate common meaning.

> One way of thinking about it - how would we communicate with an alien civilization? In a way that's how 2 machines that never interacted before could negotiate common meaning.

Interesting. Actual attempts to solve this, such as the Arecibo message, always reference "universal" constants like prime numbers, atomic structure, the speed of light, etc, to establish a common language.

I'm not sure I understand what the analog would be for two computers?

Re: Alan Kay on the misunderstanding of OOP (1998)

#184
post #183

Earlier quoted context omitted.

Well, TCP/IP was just about the mechanics of getting 2 machines to be able to communicate with each other. He hints at the end of that comment on how to expand that to include meaning and interpretation of the actual message. One way of thinking about it - how would we communicate with an alien civilization? In a way that's how 2 machines that never interacted before could negotiate common meaning.

> One way of thinking about it - how would we communicate with an alien civilization? In a way that's how 2 machines that never interacted before could negotiate common meaning. Interesting. Actual attempts to solve this, such as the Arecibo message, always reference "universal" constants like prime numbers, atomic structure, the speed of light, etc, to establish a common language. I'm not sure I understand what the…

Unfortunately, I'm not quite sure either. Alan Kay has a very socratic way of communicating (at least from reading through all his comments on the AMA) and I often feel like he's been sitting in a higher plane of thought for so long that the only way he is able to communicate his ideas is by 'forcing' the recipient to make the same jumps he has (a bit like the square in Flatland). I could be completely misunderstanding where he was going with those thoughts.

Re: Alan Kay on the misunderstanding of OOP (1998)

#185
post #149

I'd love clarification on a few points, from anyone who understands everything Alan says here: Think of the internet -- to live, it (a) has to allow many different kinds of ideas and realizations that are beyond any single standard Is he referring here to alternative protocols from http, or to the fact that behind the single http protocol are servers written in myriad languages and styles? If you focus on just messag…

the realization that assignments are a metalevel change from functions, and therefore should not be dealt with at the same level

I have no idea what Kay himself meant by this, but I personally appreciate that they are very different (and maybe my perspective aligns with his).

A function prescribes how to transform input data and produce output data. An assignment manipulates the environment of the scope itself - you are updating some state somewhere in the runtime, the interpreter or main memory.

Re: Alan Kay on the misunderstanding of OOP (1998)

#186

Earlier quoted context omitted.

One example is the HTTP GET request. This was originally conceived of as a file download, where the URL path is mapped directly to filesystem paths. GET as an RPC: "download the file at this location." But in modern thinking, HTTP GET is a request with abstract semantics. The URL's path is abstract, and may be interpreted arbitrarily by the server. The client has no idea whether the request is serviced by a simple se…

Can you define "reifiable" for me? I come across it a fair bit in clojure, but I still don't really understand what the term means.

The other comments have already answered this well enough. If you want a little more reading this is a nice example of an application of reification [0]. The first few paragraphs define it well, and then shows examples for implementing it for handling user/actor input and actions in a video game.

[0] http://gameprogrammingpatterns.com/command.html

Re: Alan Kay on the misunderstanding of OOP (1998)

#187

Earlier quoted context omitted.

Have you actually talked to educators about this? I've asked a few why OO is the first thing you learn - and the reasoning was two fold: 1) People that start off by learn imperative programming end up writing really really shitty OO code. They're they type of people that end up copy and pasting stuff everywhere. It's really hard to get students to not take the "short cut" of copy paste to think in objects when you ha…

People have trouble understanding OO because usually it is presented informally with insufferable dog/cat/mouse examples. Moreover, the fact that "subclassing==subtyping is unsound" is swept under the rug. A lot of people actually grasp the latter at an intuitive level, that's why they're never comfortable with objects. OO should be taught as abstractly as possible (I recommend Didier Remy's writings). After grasping…

> subclassing==subtyping is unsound

Could you explain what you mean by that, and why you think it's true?

Re: Alan Kay on the misunderstanding of OOP (1998)

#188

Earlier quoted context omitted.

> If anything I feel the failure of OO languages What failure exactly? OOP has flaws but it has certainly proven to be extremely versatile and adaptable over these past decades since even today, it's still the dominant paradigm to solve modern problems in computing.

Sorry, I mean "drawbacks". One of the reoccurring complaints about OO is that it leads to huge codebases. Lots of articles about how X rewrote some Java program in Y and it's not 10x smaller and 100x more maintainable. This is a consequence of languages being designed to be minimal in terms of keywords - trying to push off as much as possible on to library writers. Unfortunately this seems to have serious limitations…

The problem there is that any re-write, even staying within OO, is going to result in the codebase being smaller.

Re: Alan Kay on the misunderstanding of OOP (1998)

#189

I don't really understand this obsession with messages. We're moving away from it. This is not how we program in the 21st century. The last popular language that supported this paradigm (Objective C) is being replaced and will probably be all but gone in just a few years as Swift (not message based) takes it place. Besides, this idea of message passing is really not that useful for modern programming anyway but a lot…

Well said Cedric!

Re: Alan Kay on the misunderstanding of OOP (1998)

#190

Earlier quoted context omitted.

If you apply this common understanding of "closure" where the values that closures close over are not really values but mutable objects , then closures don't count as (pure) functions. If one thinks of them as proxies to the closed-over objects, they are quite like "procedures". Another way to think about them is simply as objects with only a single method.

They are definitely still "functions", barring the fact that Java doesn't have first-class functions and SAMs are the closest thing. C# does have first-class functions, and it is even more liberal in its closure rules. (Java can only close over `final` variables, which are immutable variable bindings. C# doesn't even have immutable variable bindings, only member bindings.) Also, they can still be "pure functions". Pu…

You are kind-of making my point. It's clearer to use "function" fore pure, mathematical functions, and otherwise "procedure"/"object"/"proxy"/"closure" whatever. Even if some popular languages misuse the term "function".

> Even then, it's a somewhat loose definition -- is allocating memory a side effect?

This is leading nowhere. Is loading a value into a register a side effect? If you care.

Post reply on HN