4 ms·
Honestly, this sentiment and most of the comments here are nerd-sniping and oneupmanship masquerading as wisdom. Obviously very few people, possibly none, know
by opportune 3y ago
Honestly, this sentiment and most of the comments here are nerd-sniping and oneupmanship masquerading as wisdom.
Obviously very few people, possibly none, know 100% of all possible knowledge (how various compilers work, all possible UB, gotchas of stdlib, patterns to use to avoid bad things) to be known about C++. Congratulations to you if you are able to find an example of something someone who “knows C++” does not know. But nobody claiming to know C++ is claiming to know 100% about it anyway, it’s obviously a way to phrase that you’re familiar with it and competent enough with it to be productive based on experience and exposure.
You wouldn’t hold a programmer in other languages to the same standard. Most people who “know Java” aren’t JVM hackers, most people who “know JavaScript” aren’t familiar with all the actual details of how JavaScript gets interpreted and executed by the browser, or how V8 works.
Yes, the main difference is that it can be easier to introduce certain classes of bugs in C++ than in other languages. You don’t need to know 100% of C++ to know it well enough to mostly avoid these. Buffer overflow, memory leaks, and UB are all something a person who “knows C++” is able to avoid by conforming to common patterns that limit the use of features leading to this behavior/structurally avoid them. Stop being pedantic
- JohnFen 3y ago> it’s obviously a way to phrase that you’re familiar with it and competent enough with it to be productive based on experience and exposure. I think the point is that almost nobody can say they "know" C++ in this sense. You have to be more specific -- what parts of C++ do you know well enough to claim competency? It's probably not all of it.
- opportune 3y agoThat’s fair, but also very clunky in practice, and essentially should be an implied point by anybody else who “knows C++.” It would be very clunky and annoying to write on a resume “knows C++20 except have limited knowledge of exceptions, template metaprogramming, and default linker/make tools” when you can just caveat out all your blind spots when you actually get to talking about which parts you know (and when your resume is being reviewed first by nontechnical folks who will interpret carves like this negatively due to ignorance). It’s not wrong or misleading to claim you are eg a cancer researcher or study English literature while not knowing all cancer research topics or all works from all niches of English literature. Because everybody who works in those areas knows that it’s implied you were exposed to only a limited subset. If laypeople assume that “knowing” a broad and complex thing means you have 100% of knowledge across the entire domain, that’s a problem with their interpretation of the claim.
- JohnFen 3y ago> It’s not wrong or misleading to claim you are eg a cancer researcher or study English literature while not knowing all cancer research topics or all works from all niches of English literature. True, but also cancer researchers and Eng Lit professors would never say they "know" cancer or English literature. They'd say what portion of those topics they know. Also, a big part of the problem is that you really can "know" most languages in their entirety at a competent level. C++ is unusual in that you can't really do this with it. So assuming that "know" means "truly expert in" is not really a ridiculous thing to do if you yourself aren't very familiar with C++.
- dkersten 3y ago> It’s probably not all of it When someone says they “know” some other language, it’s rarely all of it either. Take Python for example, I know some very good Python programmers who have been using the language for 20 years and yet wouldn’t claim they know every single feature, dunder method and standard library feature, but would absolutely say (rightly) that they know python.
- kvark 3y agoWhere C++ stands out is being wide and leaky at the same time. It allows high level programming, and yet you have to know about all those tiny low level nuances in order to avoid shooting yourself in the foot. In comparison, Java and JavaScript allow you to stay at one level and not look down.
- opportune 3y agoThat’s totally true. In practice I think most effective C++ programmers, while still not knowing nearly everything there is to know, adopt the mindset of “if I follow these rules, avoid XYZ, and don’t get overly fancy, I can avoid aiming the gun at my foot”. I’d be warier about someone claiming to know all the C++ features without having a lot of experience maintaining it or running it at scale, than someone who claims to know less features but has maintained it and ran it at scale. It’s very much a language where you need to be humble about what you don’t know and careful about introducing things you don’t understand well. I think this “use what you know” is actually true in most languages including Java and Javascript, it’s just that the failure modes usually manifest as poor performance rather than unexpected semantics like in C++.
- treprinum 3y ago...and then those effective C++ programmers get a code base where their peers throw ints in exceptions and other freakish stuff, their whole mental concept is destroyed and they need to learn to swim or sink.
- kajaktum 3y agolol 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.