Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

>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.



That's nothing new, Java successfully replaced C++ in enterprise code in the mid-to-late 1990s. Because it was safe from memory bugs.


Mid 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.


Java kind of gets around the memory leak problem by allocating all of the leak up front for the JVM. ;)


I'm a JVM guy, but this is a good one :-)


NPE isn't a memory corruption bug.


Java 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.


Those are safe.

And it’s not like Go didn’t just copy nulls (plus even has shitty initialization problems now, e.g. with make!)


Safer, 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.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: