Path: ...!eternal-september.org!feeder3.eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail From: Tim Rentsch Newsgroups: comp.lang.c Subject: Re: logically weird loop Date: Sat, 07 Dec 2024 10:18:53 -0800 Organization: A noiseless patient Spider Lines: 109 Message-ID: <86ttbficfm.fsf@linuxsc.com> References: <0e1c6d2e74d44a715bf7625ca2df022d169f878a@i2pn2.org> <865xnzlyyf.fsf@linuxsc.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Injection-Date: Sat, 07 Dec 2024 19:18:56 +0100 (CET) Injection-Info: dont-email.me; posting-host="e893c75044f434f201e517765b97f4e2"; logging-data="3426525"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1+0qMDMVjRvf+IHrm+bre6yrPXHLtQbPoY=" User-Agent: Gnus/5.11 (Gnus v5.11) Emacs/22.4 (gnu/linux) Cancel-Lock: sha1:KTWHuAV3cS63rKGcPtmUFznnKi4= sha1:Wk6Ax+ySOD7MNOGm3tk/frhhIfM= Bytes: 6644 Janis Papanagnou writes: > On 05.12.2024 02:07, Tim Rentsch wrote: > >> Janis Papanagnou writes: >> >>> Actually, if you know Simula, coroutines are inherent part of that >>> language, and they based their yet more advanced process-oriented >>> model on these. I find it amazing what Simula provided (in 1967!) >>> to support such things. Object orientation[*], coroutines, etc., >>> all fit together, powerful, and in a neat syntactical form. - But >>> "no one" is using Simula, and my friend was using C++; don't know >>> what C++ supports in that respect today. I know that he implemented >>> the "simulation" parts (queuing, time-model, etc.) in C++ himself. >>> >>> [*] It was the language who invented Object Orientation [...] >> >> No, it wasn't. First, programming in a language with classes and >> objects does not imply object-oriented programming. > > It does not necessarily imply it. But if you'd know some more about > it you might understand that it's the natural way of thinking when > simulating systems' objects, and modeling object structures. Simula > in a natural way provided the platform to program object oriented. > (As said, without coining the term or speaking about "OO".) I've been doing object-oriented programming, as explained by Alan Kay, since the late 1970s. I've written code in Simula 67, three different versions of Smalltalk, and C++. C++ is a pale shadow of Simula, and Simula is a pale shadow of Alan Kay's vision of object-oriented programming. People who think programming in C++ or Simula encourages object-oriented programming don't understand the term. >> Second, the >> underlying ideas of object-oriented programming pre-date Simula 67 >> by five years or more. > > Of course the ideas were there before Simula was released in 1967; > the inventors (also publicly) presented their ideas five years ago. The key ideas underlying object-oriented programming were not done by the people who developed Simula. >> That history has been pointed out by >> Alan Kay, who is the originator of the term and is responsible >> for pioneering the concept. > > Yes, the Simula "OO" pioneers didn't invent the *term* "OO", but they > were (amongst) the first who spread the ideas and the first inventing > a language to model OO and work with the OO concepts that are still > used and implemented in many other OO languages nowadays. You are confusing programming with classes and objects as being the same as object-oriented programming. It isn't. > (All the rest is [IMO] no more than dogmatic or marketing.) > > If you have some substance on the topic I'm always interested to hear. Let me offer some stories out of my own experiences. In the mid 1970s, I listened to Alan Kay teach his class, over two years, officially titled Philosophy of Computing but unofficially titled The Alan Kay Mystery Hour. A lot of times I was baffled by why he was talking about what he was saying, but I understood what he was saying. At least that's what I thought at the time. I might add that there was no direct explanation of either the Smalltalk language or object-oriented programming -- both were mentioned but pretty much only in passing. My reaction then was mostly that here is another guy with a favorite language but programming languages are all basically the same. (I had already been exposed to Simula before taking Alan's class.) A year or so after finishing Alan's class, I took a class titled (IIRC) "Object Oriented Programming", taught by three graduate students who had worked in Smalltalk (which at the time must have been Smalltalk 76). The course was basically how to program in Simula as though it were Smalltalk. I was already proficient in Simula before starting the class, and had no trouble following what they were saying, programming-wise. But in one class hour something interesting happened. Someone asked a question, and the answer blew my mind. It was an epiphany. Suddenly lots of the things that Alan had said fell into place; my perspective had changed. For two years Alan had been talking over my head, and in fact so far over that I hadn't even realized it. Later, in the early-to-mid 1980s, I went to graduate school at the University of North Carolina. While there I had some conversations with Fred Brooks about (among other things) object-oriented programming. I tried to give an example that would let him understand the idea I was trying to explain. I could see by his reaction that it didn't help; the idea hadn't gotten across. A year or two later one of the groups in Fred Brooks's programming projects course (I don't remember the official title) chose to do their project in Smalltalk. During the end-of-course review/demonstration, a question about was asked about changing the behavior of one part of the program (which had a visual representation so it could be seen as soon as the change was done). The person demonstrating said the change could be made in two minutes. When Brooks prompted with "Let's see", the demonstrator made the change on the spot. That made a strong impression on Fred Brooks; he looked over at me with an expression that said "there really is something to what you've been saying". That demonstration was possible not because of classes and objects but because Smalltalk embodies the principles of object-oriented programming.