Re: Why not multiple inheritance in C# and java
- From: "Aaron Queenan" <AaronQueenan@xxxxxxxxxxxxxxxxxxxxxxxxx>
- Date: Fri, 1 Jul 2005 06:21:04 -0700
That would be fantastic!
One of my bug-bears with C# is that there is no way to provide a stock
implementation of an interface. ATL makes great use of that ability with the
I*Impl templates, and it would be great to be able to do a similar thing in
C#.
Sure, it isn't absolutely necessary, but the alternative is the old
cut-and-paste methodology which I despise.
Aaron.
"cody" wrote:
> There is a proposal from Anders Hejlsberg to add support for a default
> implementation to interfaces to C#, this is something like a limited support
> for MI but sounds useful.
>
>
> "Jon Skeet [C# MVP]" <skeet@xxxxxxxxx> schrieb im Newsbeitrag
> news:MPG.1d2c4cc3f2bbb41d98c3d8@xxxxxxxxxxxxxxxxxxxxxxx
> > MAHESH MANDHARE <mahesh_dotnetinfo@xxxxxxxxxxx> wrote:
> > > Can Anyone explain me exactly why multiple inheritance not used in java
> and c#
> >
> > Basically because they introduce additional complexity into the
> > language which can then mean additional complexity in the code (whether
> > it means the code being more obviously complicated, or just harder to
> > understand at a glance).
> >
> > It was also considered that multiple inheritance of implementation is
> > rarely very beneficial. Note that there is still multiple inheritance
> > of interface in both .NET and Java.
> >
> > Never having used multiple inheritance of implementation myself, I
> > can't comment on how much of a loss it is, but I can't say I've often
> > thought "ooh, I wish I could derive from both of these classes" in my
> > code.
> >
> > --
> > Jon Skeet - <skeet@xxxxxxxxx>
> > http://www.pobox.com/~skeet
> > If replying to the group, please do not mail me too
>
>
>
.
- Prev by Date: Newbie: Count in Repeater
- Next by Date: Sorting an array of ints using a for loop
- Previous by thread: Re: Why not multiple inheritance in C# and java
- Next by thread: Re: Why not multiple inheritance in C# and java
- Index(es):
Relevant Pages
|