Deutsch   English   Français   Italiano  
<21243d708de746fc708ba7b9eeaf5a5e2b655518.camel@gmail.com>

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: wij <wyniijj5@gmail.com>
Newsgroups: comp.lang.c++
Subject: Re: What is OOP?
Date: Wed, 04 Dec 2024 08:44:26 +0800
Organization: A noiseless patient Spider
Lines: 136
Message-ID: <21243d708de746fc708ba7b9eeaf5a5e2b655518.camel@gmail.com>
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>
MIME-Version: 1.0
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable
Injection-Date: Wed, 04 Dec 2024 01:44:27 +0100 (CET)
Injection-Info: dont-email.me; posting-host="480ecf5338b3395793e3ae85a24ec6b2";
	logging-data="483276"; mail-complaints-to="abuse@eternal-september.org";	posting-account="U2FsdGVkX19URVSUjlT4y0UjLwWSPDN6"
User-Agent: Evolution 3.50.2 (3.50.2-1.fc39)
Cancel-Lock: sha1:Py5s9bjfNdxS+SyDNpDJ4lfK9OY=
In-Reply-To: <vinovj$aonc$1@dont-email.me>
Bytes: 6985

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:
> > > > >=20
> > > > > In response to the question of the subject line...
> > > > >=20
> > > > > Just because a program is being written in a language that has
> > > > > functions doesn't mean that what is being done is functional
> > > > > programming.
> > > > >=20
> > > > > 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.
> > > > >=20
> > > > > More than anything else object-oriented programming is a mindset
> > > > > or a programming methodology.=C2=A0 It helps if the language bein=
g
> > > > > used supports classes, etc, but the methodology can be used even
> > > > > in languages that don't have them.
> > > > >=20
> > > > > A quote:
> > > > >=20
> > > > > =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 My guess is that object-oriented p=
rogramming will be in the
> > > > > =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 1980s what structured programming =
was in the 1970s.
> > > > > =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 Everyone will be in favor of it.=
=C2=A0 Every manufacturer will
> > > > > =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 promote his products as supporting=
 it.=C2=A0 Every manager will
> > > > > =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 pay lip service to it.=C2=A0 Every=
 programmer will practice it
> > > > > =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 (differently).=C2=A0 And no one wi=
ll know just what it is.
> > > > >=20
> > > > > That paragraph is taken from a paper written more than 40 years
> > > > > ago.=C2=A0 The prediction came true with a vengeance, even more t=
han
> > > > > the author expected.=C2=A0 Most of what has been written about ob=
ject
> > > > > oriented programming was done by people who didn't understand it.
> > > > >=20
> > > > > Two more quotes, these from Alan Kay:
> > > > >=20
> > > > > =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 I invented the term "Object Orient=
ed Programming," and C++
> > > > > =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 is not what I had in mind.
> > > > >=20
> > > > > =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 Though Smalltalk's structure allow=
s the technique now known
> > > > > =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 as data abstraction to be easily (=
and more generally)
> > > > > =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 employed, the entire thrust of its=
 design has been to
> > > > > =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 supersede the concept of data and =
procedures entirely;=C2=A0 to
> > > > > =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 replace these with the more genera=
lly useful notions of
> > > > > =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 activity, communication, and inher=
itance.
> > > >=20
> > > > Thanks for those information (I did not particularly study 'OOP').
> > > > =C2=A0=C2=A0From my >20 years of practice, I would say the object+a=
ction 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/0465093=
06X
> > > > OO is probably also how our brain works. So, yes, we don't absolute=
ly 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).
> > > >=20
> > > > Note: A point in 'the' inheritance theory of OO is seriously false.
> > > > =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 I can't say it right now=
, it is about inherited class has to delete
> > > > =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 inherited member.
> > > >=20
> > >=20
> > > Have you ever messed around with cohort scheduling? Not sure why I am
> > > thinking of that now after reading your response. Humm...
> > >=20
> > > https://www.microsoft.com/en-us/research/wp-content/uploads/2016/02/t=
r-2001-39.pdf
> >=20
> > 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 thre=
ad first
> > (even just by reading the manual is helpful enough) not that from C++st=
d library.
> >=20
> > There are many books talk about POSIX threads in C. mess around those C=
 codes, then
> > you get the real thing.
> >=20
>=20
> Fwiw, I used POSIX Threads for many years. Heck, I even used to converse=
=20
> with the Man himself... ;^) Dave Butenhof over on c.p.t, back in its=20
> glory days. He wrote an interesting book:
>=20
> https://www.amazon.com/Programming-POSIX-Threads-David-Butenhof/dp/020163=
3922
>=20
> It was fun talking to him. :^)

Yup, I remember those days, he was diligent answering all sorts of question=
s
about pthreading. In the same period, c++ was super busy.


> So, I know how to use POSIX, and PThreads to boot. Then, when C/C++11=20
> came out, well... I started to port some of my work over to it. They=20
> work well and are more standard than PThreads in a sense?
>=20
> Fwiw, my pthread lib of choice over in the windows world was:
>=20
> https://sourceware.org/pthreads-win32/
>=20
> I remember back when I won a brand new SunFire t2000 server (before they=
=20
> were available for sale to the public) wrt the CoolThreads contest with=
=20
> my experimental vZoom project. I used PThreads on Solaris for that. fun=
=20
> times! :^D

That made me feel I was a bit awkward. OK, let's say it C++'s fault.