RE: [GD-General] Compile times
Brought to you by:
vexxed72
From: Brian H. <bri...@py...> - 2002-12-17 19:56:12
|
> Behalf Of Kyle Wilson > > This general problem -- hiding of potentially expensive > operations -- is really a problem with C++ code in general, > not just with smart pointers. Not to unfairly dog C++ -- because I've dogged it plenty in my life =) -- but this is generally a problem between "very high level languages" and "high level languages". It's a philosophical difference between "hide the details, concentrate on the overall" and "I need to know the details". The problem I see is that a lot of coders today are trying very hard to hide the details because this OOP dogma of "encapsulation, look at interfaces only, DON'T THINK ABOUT THE IMPLEMENTATION!" has been shoved down everyone's throats so much that you almost feel guilty knowing whether an operation might be expensive or not. > After all, it's not immediately > obvious whether a variable going out of scope will disappear > off the stack or call an expensive destructor when a function > exits. It's not obvious whether object destruction will free > resources or recursively call other destructors or spin-lock > waiting for another thread. And the C++ emphasis on > interface over implementation makes it harder for users of a > class to keep up with the cost of creating/deleting/using > instances of that class. Well stated. Brian |