Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

But the amount of code, modulo repetition and redundancy, that you need to look at to understand performance remains the same. You admit that in C you have to understand the performance of a function to understand the performance of any line of code that calls that function. That's just common sense. In C++ you have to understand the performance of functions, member functions, constructors, and destructors. That's more different kinds of things, but it doesn't mean there's more complexity in the program to actually understand.

This is where the C++ problem comes to bear - I have no direct control and knowledge of all classes involved in a particular computation. Yes, I can look them up - but not everybody does. And I'm concerned with building shipping products with a normal team, not some hypothetical team of superstars.

There's no difference in time or difficulty between looking up a C function and looking up a C++ member function, constructor, or destructor. Working on a codebase full of C++ language constructs and acting like only C language constructs matter is passive-aggression and should be treated as a morale problem, not a programming problem. You don't need superstars, just normal programmers who are willing to learn the language features used in the code they're hired to work on. C programmers who are happy to take a job using a different language but refuse to actually learn the language is such a 1990s problem. It shouldn't be tolerated anymore. It was a big problem in the Java community, with predictable results, and resulted in all kinds of ludicrous complaints being leveled against Java (lack of macros was raised many times as a fatal objection to Java -- there were so many things you simply couldn't do in Java because of the lack of macros), but the problem was solved -- people learned how to recognize and not hire those people.



There's no difference in time or difficulty between looking up a C function and looking up a C++ member function, constructor, or destructor

There clearly is. In my hypothetical C example, there is one function I need to look up. In the C++ example, there are up to four classes:

* Anonymous constructor class * Class for each in-parameter * Class for the return value.

just normal programmers who are willing to learn the language features used in the code they're hired to work on

The problem is that the set of language features in C++ is huge. The issue is not programmers who don't want to learn, but programmers who haven't learned the whole language yet.

I can't solve that in the hiring process unless I exclusively rely on senior-level programmers. And those are hard to come by...




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: