3 ms·
lol try using "modern" cpp without knowing all the little subtleties and you have undefined behaviors, leaky programs and unrecognizable monstrosity that you ca
by kajaktum 3y ago
lol try using "modern" cpp without knowing all the little subtleties and you have undefined behaviors, leaky programs and unrecognizable monstrosity that you can't possibly debug because you'd have to stare at walls of texts. No, it is far, far too easy to slip into madness with C++. Which is why I would rather hire someone that admits they don't know C++, be humble about it, then someone who said they are pretty confident with their C++. Nah, I don't trust any C++ code. They are all broken and must be taken with extreme care AFAIC.
When you are writing "real" programs, not just "leetcode solutions" you will come across all the myriad ways that c++ is fucked up.
- opportune 3y agoI just think you and others are arguing against a straw man that does not represent those who would off the cuff/colloquially/on their resume claim to “know C++”. Yes if you then ask to clarify and the person says they know the whole thing back to front that’s suspicious and worthy of validation. But as someone who has been primarily working with C++ (14,17,20) for several years I will continue to colloquially simplify that as “knowing C++” while having the humility to note that does not mean I know nearly everything about it. I know how to prevent subtleties and unexpected outcomes reasonably well within the subset that I commonly work with, and also know that when working outside that subset or using things I don’t understand well, that I’m wielding a footgun that must be treated with extreme caution. And most people who “know C++” would also be in that camp, and we’d know that’s what each other means when we say we “know C++”
- kajaktum 3y agoI 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.