4 ms·
Java brought two things to the table compared to C++: garbage collection, and an enormous library. I don't think that garbage collection, by itself, was a 10x
by AnimalMuppet 6y ago
Java brought two things to the table compared to C++: garbage collection, and an enormous library.
I don't think that garbage collection, by itself, was a 10x change. For it to be so, programmers would have to be spending 90% of their effort on freeing memory. Don't get me wrong, garbage collection is a big win when you can use it, but I don't think it's quite that big of a win.
The library... that might almost be 10x, by itself, because of everything that you don't have to write. The combination of that plus garbage collection gave Java quite a kick compared to C++.
- Ma8ee 6y agoNot freeing memory, but tracking down memory leaks. We rarely even hear that term nowadays, but most large commercial programs used to have them.
- loopz 6y agoMemory leak is a thing on JVM too. Tends to reoccur at times. Java brought call stack dumps, security model and alot of standardisation across orgs.
- blablabla123 6y agoOr you just reference things all the way through your program, so it's possible in every language. Still, for the memory management related kind in C++ there are tools like valgrind.
- thow-01187 6y ago+another huge benefit - Jar files and class files made the IDEs possible. Studying at the university, moving from Visual Studio/C to Eclipse/Java was a wtf-how-is-that-even-possible moment.
- stickfigure 6y agoIn the 90s I used to spend DAYS hunting down memory issues (corruption, leaks, crashes) in C++ code. Your whole schedule could slip by weeks because of one hard to reproduce issue. I haven't seen that kind of problem in a long time.
- ralphc 6y agoI was part of the C++ -> Java revolution, and I'd add the language being much simpler than C++. It felt like a rare, real 80/20 thing where you get 80% of C++'s power for 20% of the complexity.