On 08/07/14 15:44, Adriano dos Santos Fernandes wrote: > On 07/08/2014 07:00, Alex Peshkoff wrote: >
>> If we anyway need different ways to call different types of methods >> why have all this underlines? >> May be better do >> >> void RefCounted::addRefCaller() >> { >> IRefCounted::addRef(); >> } >> >> and let the rest of code look _much_ better? >> > I disagree here. This is very unnatural: > > IRefCounted::addRef(); > > Here you just mean to call the current (possibly inherited) addRef > method, but you need to prefix it with the interface name. And if you > don't, someone inheriting the implementation will have problems > difficult to understand. And it's a much more common case than calling a > super method. > > Underlines may be bad, and we may switch to something better. Maybe: > > void RefCounted2::addRefImpl() > { > RefCounted::addRefImpl(); // super > } > I can agree with your arguments provided you demonstrate a real world sample where we need to inherit the implementation of interface. The problem is that surprisingly named methods will be present always, but need in implementation inheritance is rather suspicious - currently we easily live without it. ------------------------------------------------------------------------------ Infragistics Professional Build stunning WinForms apps today! Reboot your WinForms applications with our WinForms controls. Build a bridge from your legacy apps to the future. http://pubads.g.doubleclick.net/gampad/clk?id=153845071&iu=/4140/ostg.clktrk Firebird-Devel mailing list, web interface at https://lists.sourceforge.net/lists/listinfo/firebird-devel