The point is that, with a rational team, I can tell (roughly) what a function is doing, based on the name. It's not going to be called 'dot_product' and clone data passed in ;)
What I can't tell is how much extra code the compiler will generate at this point, and that is the problem.
> If there is a hidden cost to C++, it is the fact that it requires higher level of competence. Not that it has constructors.
I didn't say the cost is in the constructors. They're a symptom of the cost. The cost is creating the mental model of your app.
Sure, if the entire team consisted of C++ superstars, we might be able to get away with this. Given the team size on current games, (and the fact that superstars are rare) that's unlikely to be the case.
If there's no enough "superstars", then perhaps your coding guidelines should accommodate that so that the "mental model" of the app would be more managaeble for the code monkeys.
This is not a question of "code monkeys". It's simply a question of having some programmers that are less experienced than others. And that's kind of unavoidable if you ever want to hire new people...
What I can't tell is how much extra code the compiler will generate at this point, and that is the problem.
> If there is a hidden cost to C++, it is the fact that it requires higher level of competence. Not that it has constructors.
I didn't say the cost is in the constructors. They're a symptom of the cost. The cost is creating the mental model of your app.
Sure, if the entire team consisted of C++ superstars, we might be able to get away with this. Given the team size on current games, (and the fact that superstars are rare) that's unlikely to be the case.