[Mono-list] Overridden method calling base method (and doing nothing else)

Jackson Harper jackson at ximian.com
Tue Dec 11 23:50:35 EST 2007


Often the methods are overridden in MS classes because they have
different attributes on them then the base class, a lot of times it is
just design time attributes.

On Tue, 2007-12-11 at 21:46 -0500, shawn vose wrote:
> Not trying to fire anyone up just curious and ignorant. 
> 
> The unanswered part of cafe's post of "Wouldn't such methods just slow
> down execution?" to me is the most important. Is mono restricted from
> making an improvement on a standard? 

In this case it wouldn't be worth it.  Almost no performance benefit vs.
forcing people to recompile their apps to run on mono.

Jackson



> 
> 
> On Dec 11, 2007 6:15 PM, Robert Jordan <robertj at gmx.net> wrote:
>         cafeaunet wrote:
>         > Hello,
>         >
>         > I notice that some methods in Mono (1.2.5.1) override a base
>         method, and
>         > just call the base method inside the overridden method. For
>         example, the 
>         > method AppendChild in the class System.Xml.XmlAttribute
>         simply calls
>         > base.AppendChild (and does nothing else). I notice this
>         behavior especially
>         > in .NET 2.0 methods.
>         >
>         > What is the rationale for such methods? It seems like these
>         overridden 
>         > methods are simply not needed. Wouldn't such methods just
>         slow down
>         > execution?
>         
>         
>         They are for API compatibility. If MS overrides a method,
>         we have to do it as well, even if our implementation details 
>         do not need the overridden method.
>         
>         Robert
>         
>         
>         _______________________________________________
>         Mono-list maillist  -  Mono-list at lists.ximian.com
>         http://lists.ximian.com/mailman/listinfo/mono-list
>         
> 
> _______________________________________________
> Mono-list maillist  -  Mono-list at lists.ximian.com
> http://lists.ximian.com/mailman/listinfo/mono-list
-- 
Jackson Harper
jackson at ximian.com




More information about the Mono-list mailing list