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 : 01. Oct 2024, 23:17:26
Autres entêtes
Organisation : A noiseless patient Spider
Message-ID : <vdhsdl$2t1fi$11@dont-email.me>
References : 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21
User-Agent : Pan/0.160 (Toresk; )
On Tue, 1 Oct 2024 14:59:04 -0700, John Ames wrote:
On Tue, 1 Oct 2024 21:51:13 -0000 (UTC)
Lawrence D'Oliveiro <ldo@nz.invalid> wrote:
C++ gave OO a bad name. I think Java was trying to make up for it,
but it introduced its own gratuitous complexities ...
Java's cleaner overall ...
You got to be kidding.
... why on earth is there an int primitive type and an Integer class!?)
Because Java wants to maintain a clear separation between “primitive”
types (int, real, boolean etc) and “reference” types (those defined by
classes and enums). Obviously this is done for efficiency reasons, but it
does complicate the language somewhat. So they needed to add those
“reference” equivalents of the “primitive” types to allow easier
interoperability with other “reference” types, and define another layer of
conversions called “boxing” and “unboxing”, I think it is, to tie the
whole mess together.
Python shows that “everything is an object” is entirely workable in terms
of language consistency and predictable behaviour, at least. And you end
up with a language only a tiny fraction of the complexity of Java. Which
still finds room for features that Java left out, like operator
overloading, multiple inheritance and metaclasses.
... and the standard library is positively Byzantine...
That’s why I say, you got to be kidding about it being “cleaner overall”.