Ident wrote: YaronCT wrote: Ident wrote:
The question though is, does it need to work the same if you rebuild for USING the API as in calling the functions or also for DERIVING from its classes, because if you say the latter is the case, well, then you could not add ANY function ever because someone might have added it in a subclass and then that wouldnt compile anymore, right?
It is not all black and white if you ask me and we just need to define where we draw the line or it will mean you cant do ANYTHING in v0 that you cant do in v0-8.
Y wouldn't it compile anymore?
Oh well I guess you are right about already existing user-functions, they will just be overriding the base function in the virtual case but then you at least can be pretty sure they wont work as expected, as it is unlikely the user does the expected thing there.
But for member variables you definitely clash.
Sorry, you're right, if there's a name clash, even if it compiles it's not guaranteed to behave the same, something I consider a flew in C++'s design which could have been easily fixed. So, in this sense, it's indeed not black or white, yet changing the prototype of an exposed function is obviously black. What we can do, though, is to lessen the chance that a name clash happens. Say, u can call the new "draw" method "drawWithMode", or even "drawWithModeByLukasMeindlId0047834981984" or something.