Sujet : Re: What is OOP?
De : wyniijj5 (at) *nospam* gmail.com (wij)
Groupes : comp.lang.c++Date : 03. Dec 2024, 11:38:52
Autres entêtes
Organisation : A noiseless patient Spider
Message-ID : <f4160b394cf17e59f10b2ed1c02db87045849f4a.camel@gmail.com>
References : 1 2 3 4
User-Agent : Evolution 3.50.2 (3.50.2-1.fc39)
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.