9. Signatures must match
Guys, this suggestion/request is based on the fact that it is not allowed (good thing) in order to successfully compile a program for signatures of class, fnc, variable(static) not to match.
So what I'm saying is, if I have classical .h and cpp structure and I'm changing let's say in cpp:
My_Class::My_Class(int,double,char)
{
/*e.b.*/
}
and for some reason I remove any element from argument list, let's say int (the first one), then it is only logical that this same happens in .h file with this ctor declaration, so from:
My_Class(int,double,char);
will become:
This should work in both ways - changing .h should be reflected in cpp and vice versa.
Same goes with adding/removing ref, ptr etc etc - they just have to match and this should be automated.
Same goes with templates:
If I have two files in order to simulate classical .h .cpp structure, so I have .h (interface) and *_impl.h (implementation)
and in my implementation file I've got
template<class T>
class X
{
/*Lots of very cool fncs decl. in here*/
};
and in my *_impl.h, I've got
template<class T>
void X<T>::one_of_many_cool_fncs(char*,double)
{
}
when I decide after some time (week, month) that another template param is needed and instead of:
template<class T>
class X
{
};
I want
template<class T,class F>
class X
{
};
then all definitions in *_impl.h should also be appropriately updated, so in my case would give me:
template<class T,class F>
void X<T,F>::one_of_many_cool_fncs(char*,double)
{
}
And again, if after some time I decide that over all it wasn't good decision at all and I decide to remove the second param (class F), again, all definitions should be appropriately updated.