5 ms·
>its creators explicitly said their goal was to replace C++ so nowadays when we say "c++" we mostly mean the works should be replaced by rust, but back then, i
by fishywang 3y ago
>its creators explicitly said their goal was to replace C++
so nowadays when we say "c++" we mostly mean the works should be replaced by rust, but back then, it's not like that.
I would argue that go successfully replaced c++ in specific domains (network, etc.), and changed your perspective on what "c++" means.
- zozbot234 3y agoThat's nothing new, Java successfully replaced C++ in enterprise code in the mid-to-late 1990s. Because it was safe from memory bugs.
- lanstin 3y agoMid 2000s in my experience. And not because it was safe from memory bugs so much as safe from memory leaks. Still had plenty of NPEs.
- justinclift 3y agoJava kind of gets around the memory leak problem by allocating all of the leak up front for the JVM. ;)
- cryptos 3y agoI'm a JVM guy, but this is a good one :-)
- pjmlp 3y agoNPE isn't a memory corruption bug.
- kaba0 3y agoThose are safe. And it’s not like Go didn’t just copy nulls (plus even has shitty initialization problems now, e.g. with make!)
- worik 3y agoJava is safe from a class of memory bugs and leaks It is still possible to leak resources in Java You have to fool the GC but it is surprisingly easy to do.
- Cthulhu_ 3y agoSafer, I'd say, but it also introduced its own issues. Its type system and - maybe more importantly - its ecosystem around things like unit testing and static analysis at the time was a few leaps ahead of C++, making it a favorite for enterprise systems and codebases where getting 5 SIG stars is a badge of honor and/or requirement. Java is easier than C++ as well, harder to mess things up. That said, Go feels easier again than Java because it got rid of a lot of cruft.