5 ms·
> Then they made "C the good parts" by making C easier but still fast and called it Java. That one doesn't feel right. More like "figure out how to nudge the C
by MrBuddyCasino 8y ago
> Then they made "C the good parts" by making C easier but still fast and called it Java.
That one doesn't feel right. More like "figure out how to nudge the C++ crowd into the general direction of Smalltalk without them noticing".
- dnautics 8y agoIs java really smalltalk under the hood? Ruby certainly is. I always got the feeling that java was c++ with a bit more religion about OO, a well defined and platform independent standard library, and no multiple inheritance.
- otabdeveloper1 8y ago> I always got the feeling that java was c++ with a bit more religion about OO No way. C++ was always much more into the functional programming paradigm. (See the STL, for example.) The connection between C++ and OOP is because OOP was the insane hype at the time when C++ was being invented. The OOP lipservice was mandatory in order to be taken seriously by the fashion-driven programming industry, but real C++ programmers always looked down on OOP and considered it a code smell and crutch.
- 0815test 8y ago> The connection between C++ and OOP is because OOP was the insane hype at the time when C++ was being invented. Not really, the C++ OOP features were directly modeled after very similar features in Simula. C++ was specifically designed as a way of bringing these sorts of features to C, although it did include other improvements to the language as well. Templates and the STL as we know it were a relatively late addition to the language. It's also worth mentioning that there's only a handful of things about OOP that could be genuinely considered "a code smell"; in fact you could restrict that concern to one feature, viz. implementation inheritance. Object-based programming which follows the "composition over inheritance" guideline can still broadly tap into the improved-modularity benefits that 'objects' are generally known for.
- atilaneves 8y ago> C++ was always much more into the functional programming paradigm. (See the STL, for example.) Always? The STL was a last-minute addition to the standard library before C++98. Just a few years before, template implementations in compilers were buggy. There's a reason Qt has its own containers: because it's that old. > The connection between C++ and OOP is because OOP was the insane hype at the time when C++ was being invented No, it was because Bjarne wanted features from Simula whilst still generating fast code. > real C++ programmers always looked down on OOP and considered it a code smell and crutch. Absolutely not. Again, look at Qt. Look at CERN's ROOT. Java looks a lot like it does because that's how C++ code was written at the time. Even in the early 2000s I was getting funny looks from people when I told them to default to putting variables on the stack.
- otabdeveloper1 8y ago> The STL was a last-minute addition to the standard library before C++98. C++ without a standard C++ library is not really C++. > No, it was because Bjarne wanted features from Simula whilst still generating fast code. Yeah, but Simula is somewhat its own thing, before the OOP madness. > Again, look at Qt. Look at CERN's ROOT. Java looks a lot like it does because that's how C++ code was written at the time. Only because C++ was the only thing available at the time, so people twisted it into 'OOP', despite the fact that C++ was very a poor fit for 'OOP'.
- AnimalMuppet 8y ago>> The STL was a last-minute addition to the standard library before C++98. > C++ without a standard C++ library is not really C++. You seem to be missing the point, which is that there was a time (two decades!) when the C++ standard library existed, but didn't include the STL. > Only because C++ was the only thing available at the time, so people twisted it into 'OOP', despite the fact that C++ was very a poor fit for 'OOP'. You are completely mistaken on your history here. C++ was intended to be "C with classes" from day one.
- otabdeveloper1 8y ago
- pron 8y agoJava is sneaky. It's a Smalltalk-y (ish) engine covered in a C++-y (ish) frontend language. This great talk (the first 20 minutes, really) describes how the original design was conceived: https://youtu.be/Dq2WQuWVrgQ https://youtu.be/Dq2WQuWVrgQ
- MrBuddyCasino 8y ago> It's a Smalltalk-y (ish) engine covered in a C++-y (ish) frontend language. That sums it up quite well.
- dnautics 8y agoIs it really the case that calling a method in Java is the equivalent of passing a message under the hood? (I don't know how the VM is structured)
- pron 8y agoI am not sure how these two philosophical views differ, but the JVM is typed, so calling a non-existent method will result in an error when the class of the callee is loaded.