4 ms·
As an outsider looking in at the world of C++ development (I work on hardware), my first thought is "Why would you want to use a tool that requires an understan
by pingswept 17y ago
As an outsider looking in at the world of C++ development (I work on hardware), my first thought is "Why would you want to use a tool that requires an understanding at that level of complexity for mastery?"
Perhaps C++ has some extraordinary benefits that I don't understand, which makes deleting the v-table before the method returns the stack to the heap worth the trouble [1]?
[1] I might have mixed up some of the terminology a little here. Feel free to correct me vigorously.
- tedunangst 17y agoYou have mixed up the terminology, vigorously. :) And that is the exact purpose of the question. To distinguish c++ programmers from pretenders. If you don't know C++, the question is nonsense, but if you are going to be writing code, you should understand the execution model sufficiently to answer it. "Yeah, this one time I double allocated a vtable on the stack of a doubly-linked binary hash."
- pingswept 17y agoA good point. And by the way, thanks so much for your work on OpenBSD (assuming you are the Ted Unangst of legend). I've been using it for years, and I appreciate the dedication of the folks who created it.
- kscaldef 17y agoDo you find it useful, in your field, to understand how your tools work? If so, perhaps you might allow that if someone is interviewing for a job using another tool (C++, in this case) that they might be expected to know how that tool works. Also, with respect, it's fairly clear from your second paragraph that you don't understand the terminology being used at all. Which is okay, it's not your field. But, it makes your assessment of how complex this discussion is somewhat suspect.
- pingswept 17y agoTotally agreed about understanding how tools work being useful. I'd just be wary of using an extremely complex tool. From what I can tell, this "C++" looks like it could self-destruct at any minute, unless handled by an expert. Perhaps that makes the case even more strongly that you ought to filter your hires most strictly, but I wonder whether there might exist a simpler tool that could do the job with fewer risks.
- DenisM 17y agoC++ is a toolkit for constructing problem-specific languages. You do this by creating new types (classes), using templates, template metaprogramming, preprocessor, multiple inheritance, and all kinds of other stuff. Once you develop a language, teach it to all your developers and establish a policy to punish deviations you can write very efficient programs - at near or exceeding asm performance (modern compilers are smarter than developers when it comes to CPU-specific optimizations). Programming in raw C++ using all its features is probably not productive - the code will not be readable by anyone except Stroustroup himself. Other languages such as Lisp also allow you to create your own language for specific problems, however they are focusing on expressive power and not on performance.