| Deutsch English Français Italiano |
|
<visjhl$1n6b4$1@dont-email.me> View for Bookmarking (what is this?) Look up another Usenet article |
Path: ...!eternal-september.org!feeder3.eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail From: Janis Papanagnou <janis_papanagnou+ng@hotmail.com> Newsgroups: comp.lang.c Subject: Re: logically weird loop Date: Thu, 5 Dec 2024 17:14:43 +0100 Organization: A noiseless patient Spider Lines: 88 Message-ID: <visjhl$1n6b4$1@dont-email.me> References: <0e1c6d2e74d44a715bf7625ca2df022d169f878a@i2pn2.org> <vhl32r$66a2$1@dont-email.me> <vhlspv$ahc9$10@dont-email.me> <vhmilk$hd28$1@dont-email.me> <vhohqf$rq03$2@dont-email.me> <20241122160540.00001d69@yahoo.com> <86ed2mlr99.fsf@linuxsc.com> <vis2cg$1ir2k$1@dont-email.me> <visfhf$1m5v7$1@dont-email.me> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit Injection-Date: Thu, 05 Dec 2024 17:14:45 +0100 (CET) Injection-Info: dont-email.me; posting-host="70862cdfb091742525c46966a1b4c3e6"; logging-data="1808740"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1+5ChYeV3lIy6COAIJ6sa0W" User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.8.0 Cancel-Lock: sha1:c1JlvXvZ8Z5PSPo3NcGBjvwUFk0= In-Reply-To: <visfhf$1m5v7$1@dont-email.me> X-Enigmail-Draft-Status: N1110 Bytes: 5216 On 05.12.2024 16:06, David Brown wrote: >> On 05.12.2024 04:53, Tim Rentsch wrote: >>> >>> Almost everyone who took Simula and C++ as the archetype for OOP >>> never understood it. > > If you take the position that Alan Key, as the person who is credited > with inventing the term "object oriented programming", gets to make the > definition of what OOP is, then Tim's statement is accurate. Originally > OOP meant something very different from how it is interpreted in C++. (I > don't know Simula except by reputation, so I can't comment on that.) (For the topic discussed here I think it would be necessary, or at least helpful, to know Simula, though.) > > The original idea of OOP was to have self-contained "objects" that > communicated only by passing messages. If object A wanted object B to > do "foo", it would not call "B.foo()" in its own context, as is done in > C++. Instead, it would pass a message "foo" to B. What B does with it, > and when, is up to B. If a return value is expected, then B will send a > message with the answer back to A. (see below) > This is, I think, akin to the modern "actor" programming paradigm, [...] > > Of course, all this has significant overheads - it is not suitable for a > low-level high efficiency language. The rather different idea of OOP > represented by languages like C++ can be very much more efficient, which > is why it caught on. Right. > > Perhaps the language that is most true to the original idea is Erlang, > with its "write once, run forever" motto. To open the knot, concerning this statement and the paragraph above where you formulate "original idea of OOP", is to make clear what each of us thinks would be crucial for "OOP". If the "OO properties" are what at the time the term "OO" was coined and associated with - which was rather late, as I think - is meant then it would be a very limited view, focused by the inventor of the *term* "OO". But the "OO" concepts - AFAICT - existed before the term. If I look up various Wikipedia entries I find the properties * Inheritance * Polymorphism * Encapsulation * Abstraction All of which have (for example) been implemented (besides some other features that support Object Oriented Programming) already by Simula. We find statements about separate, collaborating, communicating, objects, about objects having attributes and "methods" (functions). We also find statements like: "Simula introduced important concepts that are today an essential part of object-oriented programming, such as class and object, inheritance, and dynamic binding." Yet I haven't seen anyone who would dissent that Simula had been the first implemented OO language (released 1967). My (historic) experience with OO is that most people heard about OO only in context of Smalltalk (1972) [Alan Kay]. Their specific (but mostly unnecessarily introduced) terminology became common speech in that context. And the long existing Simula wasn't even known widely. As an anecdote: Decades ago there was an "OO expert" (B. Oestereich) who gave (in the upcoming flourishing OO days of C++) speeches at IT boards, he wrote books about the topic, gave interviews, and so on. His first book started with on overview of the OO languages (with Smalltalk as the root), and its descendants, and where it influenced other languages. - I sent him a mail pointing to Simula (as being, if not the root of all, at least the first OO language). Cautiously he asked me about its features and conceded that his picture was wrong. - The next edition of his book had that corrected. And the whole discussion about OO had always mostly been done with the worn blinkers. B. Stroustrup's mention of Simula in his books somewhat contributed to get a more open minded view on OO, what it is, and who has its most merits. Janis