Sujet : Re: TeX and Pascal [was Re: The joy of FORTRAN]
De : ldo (at) *nospam* nz.invalid (Lawrence D'Oliveiro)
Groupes : alt.folklore.computers comp.os.linux.miscDate : 29. Sep 2024, 08:06:57
Autres entêtes
Organisation : A noiseless patient Spider
Message-ID : <vdauah$1lq1u$1@dont-email.me>
References : 1 2 3 4 5 6 7 8 9 10 11 12
User-Agent : Pan/0.160 (Toresk; )
On Sun, 29 Sep 2024 07:50:14 +0100, The Natural Philosopher wrote:
But they didn't. They tried to hack it and it was a disaster.
I hate OO.
But C++ isn’t really OO. It’s a kind of frankenmix of some OO-like
features in with a bunch of other random things.
It is a compsci invention that doesn't map well onto an actually CPU
which is a procedural beast.
All OO languages are in fact procedural.
The opposite of “procedural” is “functional”, not “OO”.
Most of its vaunted advantages can be attained by writing C in a
structured way and others like operator overloading are just damned
confusing.
Operator overloading is in fact very useful. It allows you to build what’s
called “Domain-Specific Languages”, to allow you to express the concepts
of the problem you’re solving more naturally.
For example, being able to overload arithmetic operators to work on
vectors and matrices, which is useful for computer graphics work.
I don't WANT to use the same syntax to add two strings together as to
add two numbers.
So what syntax *do* you want to use to join strings?
I found that out in JavaScript where a comparison between a string "1"
and a number 1 failed on IE but worked on Firefox.
That’s a misfeature of JavaScript, not a fault of OO generally. For
example, Python doesn’t have that misfeature. And neither does C++, while
we’re at it.