I had an idea for a new compiler/language feature that should be feasible... Hopefully I can explain it well enough to make sense...
I am in the process of writing a driver layer for my components IB Objects so that I can use it with other databases besides InterBase and Firebird. I have made a lot of progress so far and while doing this I came across an idea that I believe would help performance. But, it seems the compiler isn't able to do what I would like.
I would like the ability to have a base class to lay down all of the basic calls the driver requires and then to have one, and only one, sub-class implement them. I would like the performance of each sub-class to have the same performance as if those methods were all static methods. For now, I am having to use virtual abstract methods in the base class and then override them in the sub-class. What I would like to see is a way to have methods be declared as abstract without being virtual at the same time. This would impose the limitation that any sub-class would be required to implement them and that they would be implemented as static methods. This would also impose the limitation that only those sub-classes (or their descendants) could be instantiated.
Hopefully what I have stated here is clear enough to know what I am getting at. I suppose this would affect the language in such a way that you could declare a method as ABSTRACT without the VIRTUAL designation.
How much of a performance loss will the virtual method layer actually impose? Perhaps it isn't significant enough to even worry about?
Thanks for any feedback.