== 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
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 :
%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
== 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{
%u:
> func(cast(I2)(new C()));
That code smells a bit (http://en.wikipedia.org/wiki/Code_smell ).
Bye,
bearophile
== 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
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
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