RE: Virtual aka overridable
"Bryan Bulten" <[email protected]>
| Newsgroups | gmane.comp.lib.wxwindows.wxnet |
|---|---|
| Message-ID | <[email protected]> |
>> I guess we have to agree to disagree on this. > > Actually, we all probably need to come to a definitive agreement on this > issue so that virtual is used consistently. > > There seem to be two options: > > 1) Virtual mirrors use in wxWidgets > 2) Use virtual always > > My vote is 2). Overriding is an advanced concept and anyone uses it knows > to > use it wisely. And like I said I believe most people are not replacing an > implementation so much as adding sub-class specific actions to the member. Given that we're wrapping a C++ library, #2 is useless, since C++ has the same explicit virtual semantics as C#. As such, even if all methods in C# were marked as virtual, the polymorphism properties wouldn't exist within the C++ bindings. I feel that if the wxWidgets designers chose to make something virtual or not, that is the best way to go. -- Bryan Bulten http://bulten.ca/ http://wxnet.sourceforge.net/ ------------------------------------------------------- This SF.Net email is sponsored by: Oracle 10g Get certified on the hottest thing ever to hit the market... Oracle 10g. Take an Oracle 10g class now, and we'll give you the exam FREE. http://ads.osdn.com/?ad_id=3149&alloc_id=8166&op=click