Specialization or/and inheritance

Pages: 12
just to save yourself writing a few trivial lines of code

It's not just about saving time and lines of code. For me, it's also about rewriting what is already written, which is in fact a sort of "copy-paste", that will make me correct the code (in case of need) in all those copies I've made. In small projects you don't feel that, but it's a hell within big projects. By the way since it's the first time I encounter this problem I would like to solve it the best way possible, because when a bad solution turns into a habit, you must reeducate yourself.

By the way, for ex. in Eclipse CDT class template the destructor is virtual by default.
I might have not worded this correctly, the thing for me is that to me inheritance is there to allow polymorphism. That is obviously not the goal here, so I wouldn't solve this with inheritance. Though of course this is rather a question of personal preference and style than a technical one. Of course your point of having to rewrite the vector interface does have some validity, but I hope you understand my concern.
Topic archived. No new replies allowed.
Pages: 12