Warning: mysqli::__construct(): (HY000/1203): User howardkn already has more than 'max_user_connections' active connections in D:\Inetpub\vhosts\howardknight.net\al.howardknight.net\includes\artfuncs.php on line 21
Failed to connect to MySQL: (1203) User howardkn already has more than 'max_user_connections' active connections
Warning: mysqli::query(): Couldn't fetch mysqli in D:\Inetpub\vhosts\howardknight.net\al.howardknight.net\index.php on line 66
Article <4253cd7cea02cd1bbbd0cebd18af9673ba2199a5.camel@gmail.com>
Deutsch   English   Français   Italiano  
<4253cd7cea02cd1bbbd0cebd18af9673ba2199a5.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: Sun, 08 Dec 2024 01:01:15 +0800
Organization: A noiseless patient Spider
Lines: 167
Message-ID: <4253cd7cea02cd1bbbd0cebd18af9673ba2199a5.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>
	 <21243d708de746fc708ba7b9eeaf5a5e2b655518.camel@gmail.com>
	 <vj0b68$2mqem$1@dont-email.me>
MIME-Version: 1.0
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable
Injection-Date: Sat, 07 Dec 2024 18:01:16 +0100 (CET)
Injection-Info: dont-email.me; posting-host="be7e840eaceccf236e484c6621607c8e";
	logging-data="3352103"; mail-complaints-to="abuse@eternal-september.org";	posting-account="U2FsdGVkX1/iXJNm44KZnmC3+4UHztir"
User-Agent: Evolution 3.50.2 (3.50.2-1.fc39)
Cancel-Lock: sha1:wkqdQGJ8etPlXKmhtEXKXBCfxGc=
In-Reply-To: <vj0b68$2mqem$1@dont-email.me>
Bytes: 8365

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:
> > > > > > >=20
> > > > > > > In response to the question of the subject line...
> > > > > > >=20
> > > > > > > Just because a program is being written in a language that ha=
s
> > > > > > > functions doesn't mean that what is being done is functional
> > > > > > > programming.
> > > > > > >=20
> > > > > > > Just because a program is being written in a language that ha=
s
> > > > > > > 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 mind=
set
> > > > > > > or a programming methodology.=C2=A0 It helps if the language =
being
> > > > > > > used supports classes, etc, but the methodology can be used e=
ven
> > > > > > > in languages that don't have them.
> > > > > > >=20
> > > > > > > A quote:
> > > > > > >=20
> > > > > > > =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 My guess is that object-=
oriented programming will be in the
> > > > > > > =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 1980s what structured pr=
ogramming was in the 1970s.
> > > > > > > =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 Everyone will be in favo=
r of it.=C2=A0 Every manufacturer will
> > > > > > > =C2=A0=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=C2=A0 pay lip service to it.=
=C2=A0 Every programmer will practice it
> > > > > > > =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 (differently).=C2=A0 And=
 no one will know just what it is.
> > > > > > >=20
> > > > > > > That paragraph is taken from a paper written more than 40 yea=
rs
> > > > > > > ago.=C2=A0 The prediction came true with a vengeance, even mo=
re than
> > > > > > > the author expected.=C2=A0 Most of what has been written abou=
t object
> > > > > > > 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=C2=A0 I invented the term "Obj=
ect Oriented Programming," and C++
> > > > > > > =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 is not what I had in min=
d.
> > > > > > >=20
> > > > > > > =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 Though Smalltalk's struc=
ture allows the technique now known
> > > > > > > =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 as data abstraction to b=
e easily (and more generally)
> > > > > > > =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 employed, the entire thr=
ust of its design has been to
> > > > > > > =C2=A0=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=C2=A0 replace these with the m=
ore generally useful notions of
> > > > > > > =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 activity, communication,=
 and inheritance.
> > > > > >=20
> > > > > > Thanks for those information (I did not particularly study 'OOP=
').
> > > > > > =C2=A0=C2=A0=C2=A0From my >20 years of practice, I would say th=
e 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/046=
509306X
> > > > > > OO is probably also how our brain works. So, yes, we don't abso=
lutely need OO
> > > > > > language to program in OO, OO is natural (thou C++ is very suit=
able. And, there
> > > > > > may be other kind of good programming model).
> > > > > >=20
> > > > > > Note: A point in 'the' inheritance theory of OO is seriously fa=
lse.
> > > > > > =C2=A0=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=C2=A0 inherited memb=
er.
> > > > > >=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/tr-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 =
thread first
> > > > (even just by reading the manual is helpful enough) not that from C=
++std library.
> > > >=20
> > > > There are many books talk about POSIX threads in C. mess around tho=
se C codes, then
> > > > you get the real thing.
> > > >=20
> > >=20
> > > Fwiw, I used POSIX Threads for many years. Heck, I even used to conve=
rse
> > > with the Man himself... ;^) Dave Butenhof over on c.p.t, back in its
> > > glory days. He wrote an interesting book:
> > >=20
> > > https://www.amazon.com/Programming-POSIX-Threads-David-Butenhof/dp/02=
01633922
> > >=20
> > > It was fun talking to him. :^)
> >=20
> > Yup, I remember those days, he was diligent answering all sorts of ques=
tions
> > about pthreading. In the same period, c++ was super busy.
>=20
> :^D So you know the realm of those "good times" for sure!
>=20
>=20
> > > 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?
> > >=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 t=
hey
> > > were available for sale to the public) wrt the CoolThreads contest wi=
th
> > > my experimental vZoom project. I used PThreads on Solaris for that. f=
un
> > > times! :^D
> >=20
> > That made me feel I was a bit awkward. OK, let's say it C++'s fault.
> >=20
>=20
> I need to find that old post over on c.p.t about a time when GCC sure=20
> seemed to break a pthread_mutex_trylock function call, wrt its critical=
=20
> 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 threa=
d
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 relative=
ly
more mature than thread.