Re: interface function overloading

2011-01-12 Thread %u
== Quote from Stanislav Blinov (bli...@loniir.ru)'s article > In C++ I sometimes have similar problems, especially with multiple > inheritance. Though, as Jonathan mentioned, those problems are even more > annoying because of hijacking: you don't always immediately notice them. > Long ago I've deci

Re: interface function overloading

2011-01-12 Thread Stanislav Blinov
09.01.2011 15:22, %u пишет: == Quote from bearophile (bearophileh...@lycos.com)'s article %u: func(cast(I2)(new C())); That code smells a bit (http://en.wikipedia.org/wiki/Code_smell ). Bye, bearophile Extract the construction and you get: module main; interface I1{} interface I2 :

Re: interface function overloading

2011-01-09 Thread bearophile
%u: > What is the deeper problem in this little snippet? > Or do you mean there is something wrong if you encounter this pattern. You are right, sorry :-) Bye, bearophile

Re: interface function overloading

2011-01-09 Thread %u
== Quote from bearophile (bearophileh...@lycos.com)'s article > %u: > > func(cast(I2)(new C())); > That code smells a bit (http://en.wikipedia.org/wiki/Code_smell ). > Bye, > bearophile Extract the construction and you get: module main; interface I1{} interface I2 : I1{} class C : I2{

Re: interface function overloading

2011-01-09 Thread bearophile
%u: > func(cast(I2)(new C())); That code smells a bit (http://en.wikipedia.org/wiki/Code_smell ). Bye, bearophile

Re: interface function overloading

2011-01-08 Thread %u
== Quote from Jonathan M Davis (jmdavisp...@gmx.com)'s article > On Saturday 08 January 2011 22:01:11 %u wrote: > > Isn't it possible to have a hierarchy in interface definitions such that it > > is possible to overload according to best interface match? > > > > This now won't compile due to multip

Re: interface function overloading

2011-01-08 Thread Jonathan M Davis
On Saturday 08 January 2011 22:01:11 %u wrote: > Isn't it possible to have a hierarchy in interface definitions such that it > is possible to overload according to best interface match? > > This now won't compile due to multiple matches. > > > module main; > > interface I1{} > interface I2

interface function overloading

2011-01-08 Thread %u
Isn't it possible to have a hierarchy in interface definitions such that it is possible to overload according to best interface match? This now won't compile due to multiple matches. module main; interface I1{} interface I2 : I1{} class C : I2{ this(){} } void func(I1 i){} void func(I2