3 ms·
I have worked with C++ codebase that is very conservative. They are basically C with a sprinkle of templates but a fuckton of OOP. C++ actually makes it harder
by kajaktum 3y ago
I have worked with C++ codebase that is very conservative. They are basically C with a sprinkle of templates but a fuckton of OOP. C++ actually makes it harder to reason about the program, not easier. I have worked with C code that is much easier to reason about. There's way too many moving parts in C++ that sometimes things just gets fucked and no one knows why.
This actually happened where I was trying to fix 1 thing but another entirely different thing broke and no one knows why. So I just leave the PR to rot. I was only 1 or 2 years into C++ at this point and I already know at that point that I don't think this shit is viable at all. I mean half of C++ talks/discussions is fixing itself, not actual real world problem.
I think you are underestimating what you know and overestimating what the average people know. I have seen interviews where there is a very large gap of knowledge but they don't seem to know that its there. It seems to me that the general population's idea of C++ is very different than those that talk and use it a lot.
- taylodl 3y agoI've migrated codebases from C to C++. The resultant codebases were an order of magnitude easier to support, easier to extend, and breathed new life into existing product lines. I had this experience at 3 different companies over the course of 20 years. Having said that, there are definitely "gotchas" that trip people up, but honestly, the biggest problems I've seen is people have a poor understanding of object-oriented analysis and design. Plus I'd love to get back all those hours of people arguing over whether methods should be private or protected, or virtual, and whatnot. It took the industry a long time to figure out the best practices and by the time those emerged a lot of bad habits had been formed. That's the biggest advantage Rust has - they started with a clean slate after the best practices had been learned. C++ needs to maintain backward compatibility and as such, it's quite a complicated language. But not so complicated it can't be learned. It just requires more effort than most other languages.