| Deutsch English Français Italiano |
|
<878qprd0v3.fsf@ic.ufrj.br> View for Bookmarking (what is this?) Look up another Usenet article |
Path: news.eternal-september.org!eternal-september.org!.POSTED!not-for-mail From: Salvador Mirzo <smirzo@example.com> Newsgroups: comp.misc Subject: Alan Kay on OOP Date: Thu, 27 Feb 2025 09:32:32 -0300 Organization: A noiseless patient Spider Lines: 80 Message-ID: <878qprd0v3.fsf@ic.ufrj.br> MIME-Version: 1.0 Content-Type: text/plain Injection-Date: Thu, 27 Feb 2025 13:32:32 +0100 (CET) Injection-Info: dont-email.me; posting-host="01e89bac3285d800d024642987689691"; logging-data="3278685"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX18aZ0dZoDjOvVR44TFoIgGLMZMzXZJwPPQ=" Cancel-Lock: sha1:mu+vU+Z7RsUYWaNl5NmIcr0+ayQ= sha1:P8++Gw4HKnAi/DJQwUFHYOPPDyo= If I recall correctly, the notion of OOP by Alan Kay was discussed not long ago in comp.lang.python. Stefan Ram shared an amazing e-mail reply given to him by Alan Kay himself. The e-mail was very enlightening, but I've spent quite some time on the last paragraph, which I'm still far from understanding. --8<-------------------------------------------------------->8--- Date: Wed, 23 Jul 2003 09:33:31 -0800 To: Stefan Ram [removed for privacy] From: Alan Kay [removed for privacy] Subject: Re: Clarification of "object-oriented" [some header lines removed for privacy] Content-Type: text/plain; charset="us-ascii" ; format="flowed" Content-Length: 4965 [...] > What does "object-oriented [programming]" mean to you? > (No tutorial-like introduction is needed, just a short > explanation [like "programming with inheritance, > polymorphism and encapsulation"] in terms of other concepts > for a reader familiar with them, if possible. Also, it is > not neccessary to explain "object", because I already have > sources with your explanation of "object" from > "Early History of Smalltalk".) (I'm not against types, but I don't know of any type systems that aren't a complete pain, so I still like dynamic typing.) 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. Cheers, Alan --8<-------------------------------------------------------->8--- I've read the Early History of Smalltalk, by the way. I think I understand what he means by ``messaging'', ``local retention and protection'' and ``hiding of state-process''. My knowledge reaches its limits a bit in ``extreme late-binding of all things'' and I get certainly puzzled in ``it can be done in Smalltalk and in LISP'' given that he is ``not aware of [others]''. I think he mentions late-binding because I suppose that is required for OOP in static languages like C++, say. But I would like to get a clear undertanding of what is early and late binding, so I probably should look at a text book with examples---homework for me to and I would be grateful if anyone wants to be my adviser here and point out a specific book or example. Now, to address my main puzzle. The email is from 2003. Alan Kay was certainly aware of Python, Java and so on. Why would his notion of OOP be impossible in Python or Java? My attempt at answering such question is this: Python, for example, doesn't enforce the hiding of state-process because there's no true private members in objects---on purpose. Is that a reason why Python fails to satisfy Alan Kay's OOP? So, his notion is that an object should really be completely opaque---the only way *possible* to interact with it would be to send it a message and possibly expect a returning message. In some lecture Alan Kay has given (to a class in a university in the US, whose name I can't remember), I remember he mentioned the Internet being a true OO system. That reinforced my idea above: a computer system cannot, for example, share state with one another in a direct way if their means of communication is a protocol such as IP. But I'm still puzzled. Although I'm sure LISP can do anything any other language ever could, it is also a language so hackable that any of its rules can also be violated by a LISP programmer, unless perhaps if we think of the programmer as the user of a certain interface whose implementation he cannot touch. Anyway, my objective here is to understand and be able to write examples in languages such as Common Lisp and Python to illustrate what he means by OOP. Thanks for any contribution anyone can offer here. Thanks!