You mean that it is a problem that you can't see which parts use how much ROM?
I don't see why a templatetized implementation could not do that too?
Would it be a problem to re-compile?
I started on such a class/object/vtable approach 2 years ago, but found a number of problems:
- it is slow for very simple operations
- it hinders optimization
- it requires an object, which takes RAM, of which there is preciously little on small micro-controllers
- compilers seem to be bad at eliminating virtual functions that are never used
About optimization and speed: suppose I have a LED on a certain pin:
typedef gpio_1_0 LED; LED::set( 0 ); // LED off
OOPs, the LED is connected to Vcc, not to ground! So I change this to
typedef invert< gpio_1_0 > LED; LED::set( 0 ); // LED off
With the template approach the second version generates exactly the same amount of code, and is exactly as fast, as the first version.
Wouter