3 ms·
Go isn't a C++ killer because there's very many usecases that C++ is commonly used for where having a runtime with a GC are absolute nonstarters. Other downsid
by treyd 2y ago
Go isn't a C++ killer because there's very many usecases that C++ is commonly used for where having a runtime with a GC are absolute nonstarters. Other downsides it has is somewhat janky and slow FFI to C, limited control over how/when data structures are copied, and green threading making granular control over processes, forking, shared memory, etc harder. These are all common things that are expected in systems programing and ever presenting it as one is dishonest.
Rust doesn't suffer from any of those issues and had a feature set comparable to that of C++ from before even 1.0, so there is actually a tenable argument that it could be a C++ killer. That didn't quite manifest because there isn't a strong reason to rewrite existing large C++ codebases, but most kinds of new projects that would have been written in C++ in like 2010 have increasingly been done in Rust instead.
- milesrout 2y agoGo is a C++ killer in a different sense: there are things that people would have written in C++ (or often in C) that are today often written in Go instead. Not everything, obviously. But Go is a great Unix glue language for programs too big to write in Shell and often those would be written in C or C++ in the past.
- baranul 2y agoAgree with your statements. Go's history on its Wikipedia page[1] and other sources, explains one of the original points that led to its development was "dislike of C++", where it was causing them all kinds of problems at their office (explained in other sources). Go was used to replace it, where possible and for their purposes, but not in a 1 to 1 way. That's neither a total replacement for C or C++, but rather a replacement in particular areas they deemed important. Carbon, on the other hand, is going that extra step where the creators of Go didn't want to. [1]: https://en.wikipedia.org/wiki/Go_(programming_language) https://en.wikipedia.org/wiki/Go_(programming_language)