| Deutsch English Français Italiano |
|
<YoecnZnC9d6bBcn6nZ2dnZfqnPudnZ2d@giganews.com> View for Bookmarking (what is this?) Look up another Usenet article |
Path: ...!Xl.tags.giganews.com!local-3.nntp.ord.giganews.com!news.giganews.com.POSTED!not-for-mail NNTP-Posting-Date: Sat, 07 Dec 2024 18:46:30 +0000 Subject: Re: What is OOP? Newsgroups: comp.lang.c++ References: <d8a5a0d563f0b9b78b34711d12d4975a7941f53a.camel@gmail.com> <86frn6og85.fsf@linuxsc.com> <853d65692ada3865dafc2c6010539ed20e4e348c.camel@gmail.com> <vile40$3k3j8$1@dont-email.me> <f4160b394cf17e59f10b2ed1c02db87045849f4a.camel@gmail.com> <vinovj$aonc$1@dont-email.me> <21243d708de746fc708ba7b9eeaf5a5e2b655518.camel@gmail.com> <vj0b68$2mqem$1@dont-email.me> <4253cd7cea02cd1bbbd0cebd18af9673ba2199a5.camel@gmail.com> From: Ross Finlayson <ross.a.finlayson@gmail.com> Date: Sat, 7 Dec 2024 10:46:44 -0800 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.6.0 MIME-Version: 1.0 In-Reply-To: <4253cd7cea02cd1bbbd0cebd18af9673ba2199a5.camel@gmail.com> Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit Message-ID: <YoecnZnC9d6bBcn6nZ2dnZfqnPudnZ2d@giganews.com> Lines: 130 X-Usenet-Provider: http://www.giganews.com X-Trace: sv3-YyRtTXoGeoHS6Yc6jCM8vT+VvGMpctL8aur0UnXzewlAQOQnLTBb2EGp00YTEY9msA/LKTXmKliivem!eWkG74DH4RSjvhBJkTJ40pjcDa1M/+lcsUH3agWIa4+FaX7ZKOBggJC9c0oHsZQkIYVyaywCpuFy X-Complaints-To: abuse@giganews.com X-DMCA-Notifications: http://www.giganews.com/info/dmca.html X-Abuse-and-DMCA-Info: Please be sure to forward a copy of ALL headers X-Abuse-and-DMCA-Info: Otherwise we will be unable to process your complaint properly X-Postfilter: 1.3.40 Bytes: 7881 On 12/07/2024 09:01 AM, wij wrote: > On Fri, 2024-12-06 at 18:16 -0800, Chris M. Thomasson wrote: >> On 12/3/2024 4:44 PM, wij wrote: >>> On Tue, 2024-12-03 at 12:16 -0800, Chris M. Thomasson wrote: >>>> On 12/3/2024 2:38 AM, wij wrote: >>>>> On Mon, 2024-12-02 at 14:59 -0800, Chris M. Thomasson wrote: >>>>>> On 12/2/2024 12:49 AM, wij wrote: >>>>>>> On Sun, 2024-12-01 at 20:34 -0800, Tim Rentsch wrote: >>>>>>>> wij <wyniijj5@gmail.com> writes: >>>>>>>> >>>>>>>> In response to the question of the subject line... >>>>>>>> >>>>>>>> Just because a program is being written in a language that has >>>>>>>> functions doesn't mean that what is being done is functional >>>>>>>> programming. >>>>>>>> >>>>>>>> Just because a program is being written in a language that has >>>>>>>> classes and objects doesn't mean that what is being done is >>>>>>>> object-oriented programming. >>>>>>>> >>>>>>>> More than anything else object-oriented programming is a mindset >>>>>>>> or a programming methodology. It helps if the language being >>>>>>>> used supports classes, etc, but the methodology can be used even >>>>>>>> in languages that don't have them. >>>>>>>> >>>>>>>> A quote: >>>>>>>> >>>>>>>> My guess is that object-oriented programming will be in the >>>>>>>> 1980s what structured programming was in the 1970s. >>>>>>>> Everyone will be in favor of it. Every manufacturer will >>>>>>>> promote his products as supporting it. Every manager will >>>>>>>> pay lip service to it. Every programmer will practice it >>>>>>>> (differently). And no one will know just what it is. >>>>>>>> >>>>>>>> That paragraph is taken from a paper written more than 40 years >>>>>>>> ago. The prediction came true with a vengeance, even more than >>>>>>>> the author expected. Most of what has been written about object >>>>>>>> oriented programming was done by people who didn't understand it. >>>>>>>> >>>>>>>> Two more quotes, these from Alan Kay: >>>>>>>> >>>>>>>> I invented the term "Object Oriented Programming," and C++ >>>>>>>> is not what I had in mind. >>>>>>>> >>>>>>>> Though Smalltalk's structure allows the technique now known >>>>>>>> as data abstraction to be easily (and more generally) >>>>>>>> employed, the entire thrust of its design has been to >>>>>>>> supersede the concept of data and procedures entirely; to >>>>>>>> replace these with the more generally useful notions of >>>>>>>> activity, communication, and inheritance. >>>>>>> >>>>>>> Thanks for those information (I did not particularly study 'OOP'). >>>>>>> From my >20 years of practice, I would say the object+action model >>>>>>> works nearly perfectly. Particularly it is the same idea with >>>>>>> abstract algebra. IOW, OOP is programming abstract algebra for >>>>>>> general problems. >>>>>>> I recently read a book (translation version) >>>>>>> https://www.amazon.com/Mind-Motion-Action-Shapes-Thought/dp/046509306X >>>>>>> OO is probably also how our brain works. So, yes, we don't absolutely need OO >>>>>>> language to program in OO, OO is natural (thou C++ is very suitable. And, there >>>>>>> may be other kind of good programming model). >>>>>>> >>>>>>> Note: A point in 'the' inheritance theory of OO is seriously false. >>>>>>> I can't say it right now, it is about inherited class has to delete >>>>>>> inherited member. >>>>>>> >>>>>> >>>>>> Have you ever messed around with cohort scheduling? Not sure why I am >>>>>> thinking of that now after reading your response. Humm... >>>>>> >>>>>> https://www.microsoft.com/en-us/research/wp-content/uploads/2016/02/tr-2001-39.pdf >>>>> >>>>> Just like the reason libwy uses POSIX API, mostly, and does pretend it is not. >>>>> If you want to understand the basic programming objects, try POSIX thread first >>>>> (even just by reading the manual is helpful enough) not that from C++std library. >>>>> >>>>> There are many books talk about POSIX threads in C. mess around those C codes, then >>>>> you get the real thing. >>>>> >>>> >>>> Fwiw, I used POSIX Threads for many years. Heck, I even used to converse >>>> with the Man himself... ;^) Dave Butenhof over on c.p.t, back in its >>>> glory days. He wrote an interesting book: >>>> >>>> https://www.amazon.com/Programming-POSIX-Threads-David-Butenhof/dp/0201633922 >>>> >>>> It was fun talking to him. :^) >>> >>> Yup, I remember those days, he was diligent answering all sorts of questions >>> about pthreading. In the same period, c++ was super busy. >> >> :^D So you know the realm of those "good times" for sure! >> >> >>>> So, I know how to use POSIX, and PThreads to boot. Then, when C/C++11 >>>> came out, well... I started to port some of my work over to it. They >>>> work well and are more standard than PThreads in a sense? >>>> >>>> Fwiw, my pthread lib of choice over in the windows world was: >>>> >>>> https://sourceware.org/pthreads-win32/ >>>> >>>> I remember back when I won a brand new SunFire t2000 server (before they >>>> were available for sale to the public) wrt the CoolThreads contest with >>>> my experimental vZoom project. I used PThreads on Solaris for that. fun >>>> times! :^D >>> >>> That made me feel I was a bit awkward. OK, let's say it C++'s fault. >>> >> >> I need to find that old post over on c.p.t about a time when GCC sure >> seemed to break a pthread_mutex_trylock function call, wrt its critical >> section indeed. > > If it was about Linux Thread (changed to NPTL), it was full of bugs. > libwy still contains old codes for Linux Thread not removed. > I now focus on using process, and planning to use process instead of thread > for muti-tasking for the future (for the coming NPU, AI era, whatever). > Also thanks to decades of practice of those 'C-people', process is relatively > more mature than thread. > > I like the idea of "term-graph re-writing" and "logic extraction" and "shape modeling", that, between the "thoroughly abstract" and "thoroughly concrete", is about a "spec language", pretty much, for all things derived and adapted, as with regards to all the tons lines procedural code and all the things.