5 ms·
How could you possibly like C++ but feel that Java is bloated? Like I academically understand disliking Java but this just makes no sense.
by justrealist 3y ago
How could you possibly like C++ but feel that Java is bloated?
Like I academically understand disliking Java but this just makes no sense.
- Jensson 3y agoC++ allows for much more terse code than java when you do small projects. It is popular in competitive programming for that reason, not just because it runs fast but also because it is really fast to write algorithms in it.
- jjnoakes 3y agoI think of Java as more bloated than C++ at runtime - with C++ I can make smaller executables that start up faster, use less memory, etc. But if you are talking about the source code itself, then things are quite different.
- loxias 3y ago??? I'll answer your question with a question: Have you seen https://github.com/EnterpriseQualityCoding/FizzBuzzEnterpriseEdition https://github.com/EnterpriseQualityCoding/FizzBuzzEnterpris... ? :) I'm guess that to those of us who remember when Java came out, "FizzBuzz: EE" is what we think of when we think of Java. :P In Java I have to type a bazillion characters to get anything done! And make all these useless directories and files and InterfaceClassFactoryProtocolStreamingSerializer BS. And worry about how that executes. C++? No bloat*, just speed *Yes, there's some _optional_ bloat. But compared to Java? no contest.
- deleted 3y ago[deleted]
- bcrosby95 3y agoWhen java came out? So mid 90s c++ vs mid 90s java?
- justrealist 3y ago> In Java I have to You have to do literally none of these things to write working Java.
- OJFord 3y agoI think people are understanding 'bloated' differently. I agree C++ is bloated in a 'just make it a setting' / 'add this feature' / 'kitchen sink' sort of way. I agree Java is bloated in a boilerplate, empty directories, maybe except for another directory, 'oh god the boilerplate' sort of way.
- loxias 3y ago> I agree C++ is bloated in a 'just make it a setting' / 'add this feature' / 'kitchen sink' sort of way. Interesting. Can you expand on this, explain more? I honestly don't know what you mean or are referring to -- and I'm a heavy modern c++ advocate -- but suspect if I did it might expand my mindset/viewpoint a bit. :)
- OJFord 3y agoHonestly I haven't actually used it since C++14 was new, but it's a common complaint IME that each 'edition' (as Rust would call it, I don't know remember the term, standard?) adds too much, there's too many ways of doing things, variations of pointers, boost, and so on. I think a lot of people wish it had stayed at say C++7, a mature C superset, but that's enough now. I probably should have said 'I understand' rather than 'I agree' - I don't feel strongly, I don't use either of them.
- loxias 3y agoOhhh, I get what you mean now, thank you! I understand (and mildly disagree). :) Yeah, C++ is a living language, I can respectfully see that bothering some people. I viewed c++98->c++11 as essentially a new language with c++14 and c++17 being "bug fixes" for the "new language" that is c++11. But certainly, it can require more learning about every decade now.
- deaddodo 3y agoI mean...Java is run through a VM while C++ is compiled to native code. I can see that being used as a reasonable argument for bloat.
- kaba0 3y ago> run through a VM This is just incorrect use/understanding of Java’s execution model. It does have a runtime, but it is definitely not a VirtualBox VM.
- deaddodo 3y agoWhat are you talking about? No one brought machine/platform virtualization into this conversation other than you. The bytecode interpreter for Java (and other similar languages) is literally called a Virtual Machine, due to the way it functions: https://en.m.wikipedia.org/wiki/Java_virtual_machine https://en.m.wikipedia.org/wiki/Java_virtual_machine It would seem your understanding of the Java execution model is flawed.