Hacker News new | past | comments | ask | show | jobs | submit login

This is really well written and seems to agree with the traditional FP lore. I'm curious what led Alan Kay then to OOP in Smalltalk.



Alan Kay OOP is a lot closer to the Actor model that you see in languages like Erlang. To be overly reductive, its all message passing and not-exposed state.


Lisp programming has never never pure functional programming. It has been sometimes used to teach functional programming, but traditional Lisp's (Common Lisp as good example) has always been multi-paradigm language and object systems in Lisp's are fairly advanced.

Alan Kay's definition of OOP:

>OOP to me means only messaging, local retention and protection and hiding of state-process, and extreme late-binding of all things. It can be done in Smalltalk and in LISP. There are possibly other systems in which this is possible, but I'm not aware of them.

http://userpage.fu-berlin.de/~ram/pub/pub_jf47ht81Ht/doc_kay...


There are no "if" statements in Smalltalk. You call the"ifTrue:ifFalse" method on an instance of a Boolean, passing two lambdas for the respective cases. To this day I don't know what an "object/functional hybrid language" is, as Smalltalk was always that


OOP used to mean something quite different than it does today. Learn smalltalk, you will be surprised.


The Early History Of Smalltalk is a good discussion of this stuff: http://worrydream.com/EarlyHistoryOfSmalltalk/


A trivial but cute detail is how the author’s email address is specified in this 1993 paper:

kay2@apple.com.Internet#

A year or two later, there would be practically no other email systems than “Internet”.


"… the insight that everything we can describe can be represented by the recursive composition of a single kind of behavioral building block that hides its combination of state and process inside itself and can be dealt with only through the exchange of messages." - Alan Kay, The Early History of Smalltalk


Whatever Alan Kay thinks OOP is, it isn't what we think it is.


just fyi, Alan Kay coined the phrase Object Oriented Programming. So your statement, while true, should probably say what we call object oreinted programming should have a different name.


If you want to do OO Alan Kay style, you need late binding, metaobject protocol, and messages. The difference between dot.setX(10) and dot.moveToHorizontalPos(10) may seem irrelevant, but the other messing with internal state, other asking object to do something.

Bastard-OO is widely successful in everyday programming because classes enforce modules + mandatory interface definitions. They restrain spaghetti code inside smaller entities that are easily managed. Software architect can define these entities and give them to code monkeys to fill. Static compilation can do rudimentary validation. It's not small feat and enables some scaling, but it's dirty and not really OO.


He did popularly name what others (Nygaard and Dahl) invented, and for which they won ACM Turing Awards.

To quote Alan Kay:- "I don't think I invented 'Object-oriented' but more or less 'noticed' what was really powerful about just making everything from complete computers communicating with non-command messages. This was all chronicled in the HOPL II chapter I wrote 'The Early History of Smalltalk'."


Simula can't be praised too highly, and it was a huge influence. But if you take the care to check, you will find out that what I termed "Object Oriented" was quite different from Simula in (what I thought were) important ways. And if you are looking for the earliest inventions of ideas like these, there are several that predate Simula (take a look at that HOPL II chapter mentioned above)


I certainly don't want to underemphasise the huge contribution of Smalltalk.

Nevertheless, consider a couple of modern widely-used languages. C++ in terms of object-orientation, is based on Simula, and Java's object model is entirely based on Simula.

I argue that it was Nygaard and Dahl who first introduced those language's key concepts (objects, classes, sub-classing and virtual functions) in a coherent and programmable form. This is why Nygaard's Turing Award page states "Kristen Nygaard is internationally acknowledged as the co-inventor with Ole-Johan Dahl of object-oriented programming and the programming language SIMULA", and why I stated in my parent response that you named the term others invented, notwithstanding that today's common use isn't necessarily consistent with your coining of the term.


> Whatever Alan Kay thinks OOP is, it isn't what we think it is

I suspect that there are a lot of people still around who encountered other OOP models before C++ and it's derivatives became dominant for whom that's not really true.


Ralph Johnson (one of the GOF) stated there are three views of OOP: the Scandinavian view; the Mystical view; and the Software Engineering view.

> "The Scandinavian view is that an OO system is one whose creators realize that programming is modeling. The mystical view is that an OO system is one that is built out of objects that communicate by sending messages to each other, and computation is the messages flying from object to object. The software engineering view is that an OO system is one that supports data abstraction, polymorphism by late-binding of function calls, and inheritance."

Most today (sadly) know only variations of the Software Engineering viewpoint.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: