473,406 Members | 2,954 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,406 software developers and data experts.

Why not multiple inheritance in C# and java

Hi ,
Can Anyone explain me exactly why multiple inheritance not used in java and c#
thanks,
Mahesh
--
Have A Good Day,
Mahesh,
Ma************@yahoo.co.in
Nov 17 '05 #1
29 4625
MAHESH MANDHARE <ma***************@yahoo.co.in> 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 - <sk***@pobox.com>
http://www.pobox.com/~skeet
If replying to the group, please do not mail me too
Nov 17 '05 #2
http://blogs.msdn.com/csharpfaq/arch.../07/85562.aspx

My personal opinion (for what it is worth!) is that it is a real shame not
to include this (regardless of all the potential pitfalls). Having heard a
speech by Anders a couple of years back, I got the impression that he really
didn't like it. But I guess that there has been only a few occasions that I
thought that I really wanted to be able to do this ...but maybe my approach
is different because I know I can't.

Br,

Mark.

"MAHESH MANDHARE" <ma***************@yahoo.co.in> wrote in message
news:3B**********************************@microsof t.com...
Hi ,
Can Anyone explain me exactly why multiple inheritance not used in java
and c#
thanks,
Mahesh
--
Have A Good Day,
Mahesh,
Ma************@yahoo.co.in

Nov 17 '05 #3
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]" <sk***@pobox.com> schrieb im Newsbeitrag
news:MP************************@msnews.microsoft.c om...
MAHESH MANDHARE <ma***************@yahoo.co.in> 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 - <sk***@pobox.com>
http://www.pobox.com/~skeet
If replying to the group, please do not mail me too

Nov 17 '05 #4
I agree wholeheartedly. I had MI in a previous world (Gupta/Centura 4GL)
and I miss it dearly. Mind you I think that all in all, c# is pretty damn
good, but I can make several real cases where MI is the correct design/model
and would save a fair amount of duplication. I have pretty much given up
hope on ever seeing it in the CLR tho.

Radek

"Mark Broadbent" <no****@nospam.com> wrote in message
news:un**************@TK2MSFTNGP12.phx.gbl...
http://blogs.msdn.com/csharpfaq/arch.../07/85562.aspx

My personal opinion (for what it is worth!) is that it is a real shame not
to include this (regardless of all the potential pitfalls). Having heard a
speech by Anders a couple of years back, I got the impression that he
really didn't like it. But I guess that there has been only a few
occasions that I thought that I really wanted to be able to do this ...but
maybe my approach is different because I know I can't.

Br,

Mark.

"MAHESH MANDHARE" <ma***************@yahoo.co.in> wrote in message
news:3B**********************************@microsof t.com...
Hi ,
Can Anyone explain me exactly why multiple inheritance not used in java
and c#
thanks,
Mahesh
--
Have A Good Day,
Mahesh,
Ma************@yahoo.co.in


Nov 17 '05 #5
Complexity can not be the reason for not adding MI,MI can depict Real world
model
when class derives from two or more parents,we can use interfaces for that I
aggree but Language Lacks one of the object oriented paradigm

Mahesh
--
Have A Good Day,
Mahesh,
Ma************@yahoo.co.in
"Jon Skeet [C# MVP]" wrote:
MAHESH MANDHARE <ma***************@yahoo.co.in> 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 - <sk***@pobox.com>
http://www.pobox.com/~skeet
If replying to the group, please do not mail me too

Nov 17 '05 #6
MAHESH MANDHARE <ma***************@yahoo.co.in> wrote:
Complexity can not be the reason for not adding MI
It can be the stated reason. Personally I'm quite happy to have a
simpler language at the cost of MI, but I realise it's a trade-off not
everyone's happier with.
MI can depict Real world model when class derives from two or more
parents,we can use interfaces for that I aggree but Language Lacks
one of the object oriented paradigm


It's not one of the pillars of object orientation as far as I'm
concerned, personally...

--
Jon Skeet - <sk***@pobox.com>
http://www.pobox.com/~skeet
If replying to the group, please do not mail me too
Nov 17 '05 #7
Complexity can not be the reason for not adding MI,MI can depict Real world
model
when class derives from two or more parents,we can use interfaces for that I
aggree but Language Lacks one of the object oriented paradigm

Mahesh
--
Have A Good Day,
Mahesh,
Ma************@yahoo.co.in
"Jon Skeet [C# MVP]" wrote:
MAHESH MANDHARE <ma***************@yahoo.co.in> 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 - <sk***@pobox.com>
http://www.pobox.com/~skeet
If replying to the group, please do not mail me too

Nov 17 '05 #8
MAHESH MANDHARE <ma***************@yahoo.co.in> wrote:
Complexity can not be the reason for not adding MI
It can be the stated reason. Personally I'm quite happy to have a
simpler language at the cost of MI, but I realise it's a trade-off not
everyone's happier with.
MI can depict Real world model when class derives from two or more
parents,we can use interfaces for that I aggree but Language Lacks
one of the object oriented paradigm


It's not one of the pillars of object orientation as far as I'm
concerned, personally...

--
Jon Skeet - <sk***@pobox.com>
http://www.pobox.com/~skeet
If replying to the group, please do not mail me too
Nov 17 '05 #9
hi Radek,
ya i think there must be some genune reason or problems with using MI .
I just wanted to know that.
can you describe real cases where MI is the correct design/model
and would save a fair amount of duplication.

Mahesh
--
Have A Good Day,
Mahesh,
Ma************@yahoo.co.in
"Radek Cerny" wrote:
I agree wholeheartedly. I had MI in a previous world (Gupta/Centura 4GL)
and I miss it dearly. Mind you I think that all in all, c# is pretty damn
good, but I can make several real cases where MI is the correct design/model
and would save a fair amount of duplication. I have pretty much given up
hope on ever seeing it in the CLR tho.

Radek

"Mark Broadbent" <no****@nospam.com> wrote in message
news:un**************@TK2MSFTNGP12.phx.gbl...
http://blogs.msdn.com/csharpfaq/arch.../07/85562.aspx

My personal opinion (for what it is worth!) is that it is a real shame not
to include this (regardless of all the potential pitfalls). Having heard a
speech by Anders a couple of years back, I got the impression that he
really didn't like it. But I guess that there has been only a few
occasions that I thought that I really wanted to be able to do this ...but
maybe my approach is different because I know I can't.

Br,

Mark.

"MAHESH MANDHARE" <ma***************@yahoo.co.in> wrote in message
news:3B**********************************@microsof t.com...
Hi ,
Can Anyone explain me exactly why multiple inheritance not used in java
and c#
thanks,
Mahesh
--
Have A Good Day,
Mahesh,
Ma************@yahoo.co.in



Nov 17 '05 #10
I'd be interested in wich cases, I've been thinking a lot about that...
(not out of scepticism, but out of ... em interest & learning possibilities)

Care to enlighten me?

Thanks,

Wiebe
Radek Cerny wrote:
I agree wholeheartedly. I had MI in a previous world (Gupta/Centura 4GL)
and I miss it dearly. Mind you I think that all in all, c# is pretty damn
good, but I can make several real cases where MI is the correct design/model
and would save a fair amount of duplication. I have pretty much given up
hope on ever seeing it in the CLR tho.

Radek

"Mark Broadbent" <no****@nospam.com> wrote in message
news:un**************@TK2MSFTNGP12.phx.gbl...
http://blogs.msdn.com/csharpfaq/arch.../07/85562.aspx

My personal opinion (for what it is worth!) is that it is a real shame not
to include this (regardless of all the potential pitfalls). Having heard a
speech by Anders a couple of years back, I got the impression that he
really didn't like it. But I guess that there has been only a few
occasions that I thought that I really wanted to be able to do this ...but
maybe my approach is different because I know I can't.

Br,

Mark.

"MAHESH MANDHARE" <ma***************@yahoo.co.in> wrote in message
news:3B**********************************@micros oft.com...
Hi ,
Can Anyone explain me exactly why multiple inheritance not used in java
and c#
thanks,
Mahesh
--
Have A Good Day,
Mahesh,
Ma************@yahoo.co.in



Nov 17 '05 #11
In my architecture, I keep 100% separation of business functionality from
presentation layer (Web Services connect a rich,thin client to functional
server objects). So I have two separate cases. Server-side, I have more
control over, as I do not use Datasets or such - my objects are built from
the ground up.
However, on the client, I must provide all controls that are capable of
talking my specific Web Service schema to the server, but I must inherit
from the standard WinForms controls. I have no choice but to replicate code
in a checkbox, textbox, radio button class etc. If I had MI, I would have
an abstract class that understood my schema, and all the window classes
would inherit from that as well as the .NET supplied standard Windows
classes. For now, I can only implement an interface, but there is much code
that is identical across controls.
Server-side, I would still like MI, but learned to live without it.
Philosophically, I can not understand those who do not appreciate MI; used
correctly, you can normalise your code base like you would normalise your
database.

Radek

"Wiebe Tijsma" <wi*********@CAPITALStijsma.com> wrote in message
news:%2****************@TK2MSFTNGP10.phx.gbl...
I'd be interested in wich cases, I've been thinking a lot about that...
(not out of scepticism, but out of ... em interest & learning
possibilities)

Care to enlighten me?

Thanks,

Wiebe
Radek Cerny wrote:
I agree wholeheartedly. I had MI in a previous world (Gupta/Centura 4GL)
and I miss it dearly. Mind you I think that all in all, c# is pretty
damn good, but I can make several real cases where MI is the correct
design/model and would save a fair amount of duplication. I have pretty
much given up hope on ever seeing it in the CLR tho.

Radek

"Mark Broadbent" <no****@nospam.com> wrote in message
news:un**************@TK2MSFTNGP12.phx.gbl...
http://blogs.msdn.com/csharpfaq/arch.../07/85562.aspx

My personal opinion (for what it is worth!) is that it is a real shame
not to include this (regardless of all the potential pitfalls). Having
heard a speech by Anders a couple of years back, I got the impression
that he really didn't like it. But I guess that there has been only a few
occasions that I thought that I really wanted to be able to do this
...but maybe my approach is different because I know I can't.

Br,

Mark.

"MAHESH MANDHARE" <ma***************@yahoo.co.in> wrote in message
news:3B**********************************@micro soft.com...

Hi ,
Can Anyone explain me exactly why multiple inheritance not used in java
and c#
thanks,
Mahesh
--
Have A Good Day,
Mahesh,
Ma************@yahoo.co.in


Nov 17 '05 #12
why not making a class for cummunicating with the server and instantiating
it in each control?

class ServerTalker
{
public ServerTalker(Control c){}
}

"Radek Cerny" <rc****@optusnet.nospam.com.au> schrieb im Newsbeitrag
news:#M**************@TK2MSFTNGP12.phx.gbl...
In my architecture, I keep 100% separation of business functionality from
presentation layer (Web Services connect a rich,thin client to functional
server objects). So I have two separate cases. Server-side, I have more
control over, as I do not use Datasets or such - my objects are built from
the ground up.
However, on the client, I must provide all controls that are capable of
talking my specific Web Service schema to the server, but I must inherit
from the standard WinForms controls. I have no choice but to replicate code in a checkbox, textbox, radio button class etc. If I had MI, I would have
an abstract class that understood my schema, and all the window classes
would inherit from that as well as the .NET supplied standard Windows
classes. For now, I can only implement an interface, but there is much code that is identical across controls.
Server-side, I would still like MI, but learned to live without it.
Philosophically, I can not understand those who do not appreciate MI; used
correctly, you can normalise your code base like you would normalise your
database.

Radek

"Wiebe Tijsma" <wi*********@CAPITALStijsma.com> wrote in message
news:%2****************@TK2MSFTNGP10.phx.gbl...
I'd be interested in wich cases, I've been thinking a lot about that...
(not out of scepticism, but out of ... em interest & learning
possibilities)

Care to enlighten me?

Thanks,

Wiebe
Radek Cerny wrote:
I agree wholeheartedly. I had MI in a previous world (Gupta/Centura 4GL) and I miss it dearly. Mind you I think that all in all, c# is pretty
damn good, but I can make several real cases where MI is the correct
design/model and would save a fair amount of duplication. I have pretty much given up hope on ever seeing it in the CLR tho.

Radek

"Mark Broadbent" <no****@nospam.com> wrote in message
news:un**************@TK2MSFTNGP12.phx.gbl...

http://blogs.msdn.com/csharpfaq/arch.../07/85562.aspx

My personal opinion (for what it is worth!) is that it is a real shame
not to include this (regardless of all the potential pitfalls). Having
heard a speech by Anders a couple of years back, I got the impression
that he really didn't like it. But I guess that there has been only a fewoccasions that I thought that I really wanted to be able to do this
...but maybe my approach is different because I know I can't.

Br,

Mark.

"MAHESH MANDHARE" <ma***************@yahoo.co.in> wrote in message
news:3B**********************************@micro soft.com...

>Hi ,
>Can Anyone explain me exactly why multiple inheritance not used in java>and c#
>thanks,
>Mahesh
>--
>Have A Good Day,
>Mahesh,
>Ma************@yahoo.co.in

Nov 17 '05 #13
The classic problem with multiple inheritance, which Anders mentioned
in his whiteboard talk, is the diamond problem, created by this
scenario:

public class A { ... }

public class B : A { ... }

public class C : A { ... }

public class D : B, C { ... }

If classes B and C both override the same virtual member of A, which
member do you choose in D? B's override or C's override? This is, I
think, the "added complexity" that people are talking about here.

My impression from Anders' whiteboard talk is that you so rarely want
full-blown multiple inheritance that it's not really worth the hassle
it introduces. Everything you add to a language makes it more
complicated to some degree, and so you have to weigh potential benefits
versus added complexity. I think that Anders Hejlsberg is a minimalist
at heart, and prefers to leave features out of a language unless
there's a compelling reason to include them.

Nov 17 '05 #14
Sounds like you're tightly coupling components directly to your model,
maybe you just need to apply the MVC (Model-View Controller) pattern.

You can mimic MI by delegating your interface to a class implementing
the same interface right?

It does require you to redeclare all implementing methods indeed, wich
is a pain if your interface is fairly complex and need to implement it
on many classes.

Antoher option is to declare 2 interfaces/base class, and have your
classes work with both. like the IXPathNavigable and XPathNavigator,
where the declaring interface only consists of 1 method that retrieves
the more complex base class instance:

interface IXPathNavigable {
XPathNavigator CreateNavigator();
}

like this:

interface IMyInterface {
... many methods implementation ...
}

interface IMyInterfaceSource {
IMyInterface GetMyInterface()
}

public class MyClass : IMyInterface, IMyInterfaceSource {

/* many methods implementation */

IMyInterface IMyInterfaceSource.GetMyInterface(){
return this;
}

}

// Your inherited components only need to implement IMyInterfaceSource,
// wich could be relatively easy with 4 lines of code:

public class MyCheckBox : CheckBox, IMyInterfaceSource {
private IMyInterface implementation = new MyClass();

IMyInterface IMyInterfaceSource.GetMyInterface(){
return implementation;
}
}

[ I do believe interfaces should be kept simple though, and if it
requires a lot of methods, don't use interfaces but abstract base classes ]

sometimes I miss some delphi functionality, where you can delegate the
entire interface to a property of the instance. Explanation:
http://www.netindustry.nl/blog/2005/04/wheres-in-c.html

Hmm maybe I should write an article about it, any suggestions? ;-)

About the table normalization, isn't a table layout much more limited
than MI? I don't even use databases at the moment that use table
inheritance at all, let alone multiple table inheritance, wich one do
you use?

Wiebe

Radek Cerny wrote:
In my architecture, I keep 100% separation of business functionality from
presentation layer (Web Services connect a rich,thin client to functional
server objects). So I have two separate cases. Server-side, I have more
control over, as I do not use Datasets or such - my objects are built from
the ground up.
However, on the client, I must provide all controls that are capable of
talking my specific Web Service schema to the server, but I must inherit
from the standard WinForms controls. I have no choice but to replicate code
in a checkbox, textbox, radio button class etc. If I had MI, I would have
an abstract class that understood my schema, and all the window classes
would inherit from that as well as the .NET supplied standard Windows
classes. For now, I can only implement an interface, but there is much code
that is identical across controls.
Server-side, I would still like MI, but learned to live without it.
Philosophically, I can not understand those who do not appreciate MI; used
correctly, you can normalise your code base like you would normalise your
database.

Radek

"Wiebe Tijsma" <wi*********@CAPITALStijsma.com> wrote in message
news:%2****************@TK2MSFTNGP10.phx.gbl...
I'd be interested in wich cases, I've been thinking a lot about that...
(not out of scepticism, but out of ... em interest & learning
possibilities)

Care to enlighten me?

Thanks,

Wiebe
Radek Cerny wrote:
I agree wholeheartedly. I had MI in a previous world (Gupta/Centura 4GL)
and I miss it dearly. Mind you I think that all in all, c# is pretty
damn good, but I can make several real cases where MI is the correct
design/model and would save a fair amount of duplication. I have pretty
much given up hope on ever seeing it in the CLR tho.

Radek

"Mark Broadbent" <no****@nospam.com> wrote in message
news:un**************@TK2MSFTNGP12.phx.gbl...
http://blogs.msdn.com/csharpfaq/arch.../07/85562.aspx

My personal opinion (for what it is worth!) is that it is a real shame
not to include this (regardless of all the potential pitfalls). Having
heard a speech by Anders a couple of years back, I got the impression
that he really didn't like it. But I guess that there has been only a few
occasions that I thought that I really wanted to be able to do this
...but maybe my approach is different because I know I can't.

Br,

Mark.

"MAHESH MANDHARE" <ma***************@yahoo.co.in> wrote in message
news:3B**********************************@micr osoft.com...
>Hi ,
>Can Anyone explain me exactly why multiple inheritance not used in java
>and c#
>thanks,
>Mahesh
>--
>Have A Good Day,
>Mahesh,
>Ma************@yahoo.co.in

Nov 17 '05 #15
That would work, but its as much work to intercept the events and pass on
the relevant data. And it does not read/feel as good.

"cody" <de********@gmx.de> wrote in message
news:u8**************@TK2MSFTNGP14.phx.gbl...
why not making a class for cummunicating with the server and instantiating
it in each control?

class ServerTalker
{
public ServerTalker(Control c){}
}

"Radek Cerny" <rc****@optusnet.nospam.com.au> schrieb im Newsbeitrag
news:#M**************@TK2MSFTNGP12.phx.gbl...
In my architecture, I keep 100% separation of business functionality from
presentation layer (Web Services connect a rich,thin client to functional
server objects). So I have two separate cases. Server-side, I have more
control over, as I do not use Datasets or such - my objects are built
from
the ground up.
However, on the client, I must provide all controls that are capable of
talking my specific Web Service schema to the server, but I must inherit
from the standard WinForms controls. I have no choice but to replicate

code
in a checkbox, textbox, radio button class etc. If I had MI, I would
have
an abstract class that understood my schema, and all the window classes
would inherit from that as well as the .NET supplied standard Windows
classes. For now, I can only implement an interface, but there is much

code
that is identical across controls.
Server-side, I would still like MI, but learned to live without it.
Philosophically, I can not understand those who do not appreciate MI;
used
correctly, you can normalise your code base like you would normalise your
database.

Radek

"Wiebe Tijsma" <wi*********@CAPITALStijsma.com> wrote in message
news:%2****************@TK2MSFTNGP10.phx.gbl...
> I'd be interested in wich cases, I've been thinking a lot about that...
> (not out of scepticism, but out of ... em interest & learning
> possibilities)
>
> Care to enlighten me?
>
> Thanks,
>
> Wiebe
>
>
> Radek Cerny wrote:
>> I agree wholeheartedly. I had MI in a previous world (Gupta/Centura 4GL) >> and I miss it dearly. Mind you I think that all in all, c# is pretty
>> damn good, but I can make several real cases where MI is the correct
>> design/model and would save a fair amount of duplication. I have pretty >> much given up hope on ever seeing it in the CLR tho.
>>
>> Radek
>>
>> "Mark Broadbent" <no****@nospam.com> wrote in message
>> news:un**************@TK2MSFTNGP12.phx.gbl...
>>
>>>http://blogs.msdn.com/csharpfaq/arch.../07/85562.aspx
>>>
>>>My personal opinion (for what it is worth!) is that it is a real shame
>>>not to include this (regardless of all the potential pitfalls). Having
>>>heard a speech by Anders a couple of years back, I got the impression
>>>that he really didn't like it. But I guess that there has been only a few >>>occasions that I thought that I really wanted to be able to do this
>>>...but maybe my approach is different because I know I can't.
>>>
>>>Br,
>>>
>>>Mark.
>>>
>>>"MAHESH MANDHARE" <ma***************@yahoo.co.in> wrote in message
>>>news:3B**********************************@micro soft.com...
>>>
>>>>Hi ,
>>>>Can Anyone explain me exactly why multiple inheritance not used in java >>>>and c#
>>>>thanks,
>>>>Mahesh
>>>>--
>>>>Have A Good Day,
>>>>Mahesh,
>>>>Ma************@yahoo.co.in
>>>
>>>
>>


Nov 17 '05 #16
Its not really tight coupling. I have a an appserver that houses stateful
user sessions that house by business objects. These objects have Fields and
Methods, and an inbuilt O/R mapping layer. The user interface is simply a
"mirror" of the innards of the business objects. So if the UI changes a
Field, it tells the business object, via a WebService, eg
<Field id="FirstName" value="Radek"/>. The server keeps all internal
changes and publishes any other value changes, and the UI is responsible for
displaying the results. So each client widget, eg TextBox, CheckBox etc
must know what Field it is bound to (or method if its a Button), and
sufficient logic to compose a reasonable request to the server (you can
change more than value, and NULLs always complicate things etc). I would
love to encapsulate this in a class (which I have in the Gupta language) and
simply inherit from both the Windows Control type and my class. At worst, I
would have to tie change events together and invoke a method. The member
variables, such as the Field I am bound to are necessarily repeated for each
Windows control type, and that offends me. There is no such design/code
duplication on the server code.

Radek

"Wiebe Tijsma" <wi*********@CAPITALStijsma.com> wrote in message
news:u6**************@TK2MSFTNGP15.phx.gbl...
Sounds like you're tightly coupling components directly to your model,
maybe you just need to apply the MVC (Model-View Controller) pattern.

You can mimic MI by delegating your interface to a class implementing the
same interface right?

It does require you to redeclare all implementing methods indeed, wich is
a pain if your interface is fairly complex and need to implement it on
many classes.

Antoher option is to declare 2 interfaces/base class, and have your
classes work with both. like the IXPathNavigable and XPathNavigator, where
the declaring interface only consists of 1 method that retrieves the more
complex base class instance:

interface IXPathNavigable {
XPathNavigator CreateNavigator();
}

like this:

interface IMyInterface {
... many methods implementation ...
}

interface IMyInterfaceSource {
IMyInterface GetMyInterface()
}

public class MyClass : IMyInterface, IMyInterfaceSource {

/* many methods implementation */

IMyInterface IMyInterfaceSource.GetMyInterface(){
return this;
}

}

// Your inherited components only need to implement IMyInterfaceSource, //
wich could be relatively easy with 4 lines of code:

public class MyCheckBox : CheckBox, IMyInterfaceSource {
private IMyInterface implementation = new MyClass();

IMyInterface IMyInterfaceSource.GetMyInterface(){
return implementation;
}
}

[ I do believe interfaces should be kept simple though, and if it requires
a lot of methods, don't use interfaces but abstract base classes ]

sometimes I miss some delphi functionality, where you can delegate the
entire interface to a property of the instance. Explanation:
http://www.netindustry.nl/blog/2005/04/wheres-in-c.html

Hmm maybe I should write an article about it, any suggestions? ;-)

About the table normalization, isn't a table layout much more limited than
MI? I don't even use databases at the moment that use table inheritance at
all, let alone multiple table inheritance, wich one do you use?

Wiebe

Radek Cerny wrote:
In my architecture, I keep 100% separation of business functionality from
presentation layer (Web Services connect a rich,thin client to functional
server objects). So I have two separate cases. Server-side, I have more
control over, as I do not use Datasets or such - my objects are built
from the ground up.
However, on the client, I must provide all controls that are capable of
talking my specific Web Service schema to the server, but I must inherit
from the standard WinForms controls. I have no choice but to replicate
code in a checkbox, textbox, radio button class etc. If I had MI, I
would have an abstract class that understood my schema, and all the
window classes would inherit from that as well as the .NET supplied
standard Windows classes. For now, I can only implement an interface,
but there is much code that is identical across controls.
Server-side, I would still like MI, but learned to live without it.
Philosophically, I can not understand those who do not appreciate MI;
used correctly, you can normalise your code base like you would normalise
your database.

Radek

"Wiebe Tijsma" <wi*********@CAPITALStijsma.com> wrote in message
news:%2****************@TK2MSFTNGP10.phx.gbl...
I'd be interested in wich cases, I've been thinking a lot about that...
(not out of scepticism, but out of ... em interest & learning
possibilities)

Care to enlighten me?

Thanks,

Wiebe
Radek Cerny wrote:

I agree wholeheartedly. I had MI in a previous world (Gupta/Centura
4GL) and I miss it dearly. Mind you I think that all in all, c# is
pretty damn good, but I can make several real cases where MI is the
correct design/model and would save a fair amount of duplication. I
have pretty much given up hope on ever seeing it in the CLR tho.

Radek

"Mark Broadbent" <no****@nospam.com> wrote in message
news:un**************@TK2MSFTNGP12.phx.gbl.. .
>http://blogs.msdn.com/csharpfaq/arch.../07/85562.aspx
>
>My personal opinion (for what it is worth!) is that it is a real shame
>not to include this (regardless of all the potential pitfalls). Having
>heard a speech by Anders a couple of years back, I got the impression
>that he really didn't like it. But I guess that there has been only a
>few occasions that I thought that I really wanted to be able to do this
>...but maybe my approach is different because I know I can't.
>
>Br,
>
>Mark.
>
>"MAHESH MANDHARE" <ma***************@yahoo.co.in> wrote in message
>news:3B**********************************@mic rosoft.com...
>
>
>>Hi ,
>>Can Anyone explain me exactly why multiple inheritance not used in
>>java and c#
>>thanks,
>>Mahesh
>>--
>>Have A Good Day,
>>Mahesh,
>>Ma************@yahoo.co.in
>
>

Nov 17 '05 #17
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]" <sk***@pobox.com> schrieb im Newsbeitrag
news:MP************************@msnews.microsoft.c om...
MAHESH MANDHARE <ma***************@yahoo.co.in> 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 - <sk***@pobox.com>
http://www.pobox.com/~skeet
If replying to the group, please do not mail me too


Nov 17 '05 #18
hi Bruce ,
we can specify that this D's method is derived from b or c.
In the Languages like c++ this kind of functionality is there then why not
in c#
--
Have A Good Day,
Mahesh,
Ma************@yahoo.co.in
"Bruce Wood" wrote:
The classic problem with multiple inheritance, which Anders mentioned
in his whiteboard talk, is the diamond problem, created by this
scenario:

public class A { ... }

public class B : A { ... }

public class C : A { ... }

public class D : B, C { ... }

If classes B and C both override the same virtual member of A, which
member do you choose in D? B's override or C's override? This is, I
think, the "added complexity" that people are talking about here.

My impression from Anders' whiteboard talk is that you so rarely want
full-blown multiple inheritance that it's not really worth the hassle
it introduces. Everything you add to a language makes it more
complicated to some degree, and so you have to weigh potential benefits
versus added complexity. I think that Anders Hejlsberg is a minimalist
at heart, and prefers to leave features out of a language unless
there's a compelling reason to include them.

Nov 17 '05 #19
I would be happy with an MI implementation that would disallow that pattern,
although as Mahesh pointed out, there are ways around it if allowed.

Unfortunately, having been brought up in an MI OO world, I think and design
in MI, but in the end have to settle for an SI implementation.

"Bruce Wood" <br*******@canada.com> wrote in message
news:11*********************@f14g2000cwb.googlegro ups.com...
The classic problem with multiple inheritance, which Anders mentioned
in his whiteboard talk, is the diamond problem, created by this
scenario:

public class A { ... }

public class B : A { ... }

public class C : A { ... }

public class D : B, C { ... }

If classes B and C both override the same virtual member of A, which
member do you choose in D? B's override or C's override? This is, I
think, the "added complexity" that people are talking about here.

My impression from Anders' whiteboard talk is that you so rarely want
full-blown multiple inheritance that it's not really worth the hassle
it introduces. Everything you add to a language makes it more
complicated to some degree, and so you have to weigh potential benefits
versus added complexity. I think that Anders Hejlsberg is a minimalist
at heart, and prefers to leave features out of a language unless
there's a compelling reason to include them.

Nov 17 '05 #20
Tom
MI is a feature of OO. Without MI, you couldn’t represent real world objects
as they are in the real world… When you’re doing your design, you model
things as they are in the real world, and therefore creating an accurate
representation of the things within your system. However, because not all
the features of OO are supported within the language (C#, Java…) you need to
make implementation decision within your design… If the thing in the system
is derived from several other things, then surely the language should support
that? Good design will mean that MI only happens where it actually happens
in the real world.

And anyway, shouldn’t it be up to the designer at design time how
complicated a part of a system is, why should the language inhibit the
ability to create systems which represent the design? Bad design brings many
problems, coupling cohesion and MI problems… Good design prevails, let
people have MI.

"Jon Skeet [C# MVP]" wrote:
MAHESH MANDHARE <ma***************@yahoo.co.in> 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 - <sk***@pobox.com>
http://www.pobox.com/~skeet
If replying to the group, please do not mail me too

Nov 17 '05 #21
Tom <To*@discussions.microsoft.com> wrote:
MI is a feature of OO.
It's a feature of *some* OO languages, and those who are fans of those
languages tend to decide to define it as a feature of OO itself.
Without MI, you couldn?t represent real world objects
as they are in the real world? When you?re doing your design, you model
things as they are in the real world, and therefore creating an accurate
representation of the things within your system.
My experience is that trying to make things just like they are in the
real world is a recipe for disaster in OO. I suspect we'll just have to
agree to disagree on this though.
However, because not all
the features of OO are supported within the language (C#, Java?) you need to
make implementation decision within your design? If the thing in the system
is derived from several other things, then surely the language should support
that? Good design will mean that MI only happens where it actually happens
in the real world.

And anyway, shouldn?t it be up to the designer at design time how
complicated a part of a system is, why should the language inhibit the
ability to create systems which represent the design? Bad design brings many
problems, coupling cohesion and MI problems? Good design prevails, let
people have MI.


The same argument can be (and has been) made about garbage collection -
why should we be "babied" in terms of memory allocation? We're smart
developers, let us handle it.

Blugh. Give me a simple language with garbage collection over a complex
language without it any day.

--
Jon Skeet - <sk***@pobox.com>
http://www.pobox.com/~skeet
If replying to the group, please do not mail me too
Nov 17 '05 #22
hi jon ,
i want to clerify you something MI is object oriented concept
and not feature of *some* OO languages
The same argument can be (and has been) made about garbage collection -
why should we be "babied" in terms of memory allocation? We're smart
developers, let us handle it.
and you can not compare it with Garbage collection
it is Memory managemant issue which should not be responcibility of smart
developer.
why C# implements inheritance also let it handeled by dev.and garbage
collection is handled by .net framwork not C#.
C# is oo Language,isn't it ?
so it should implement as much oo concept as it can at the cost of complexity.
I can understand there must be some complecities that might have prevented
language designers to implement this feature.
but i would be happy to see C# with all this complexities resolved at
language Design level which might be little more to acpect but ithink this
can be distinguishing feature of C#.

--
Have A Good Day,
Mahesh,
Ma************@yahoo.co.in
"Jon Skeet [C# MVP]" wrote:
Tom <To*@discussions.microsoft.com> wrote:
MI is a feature of OO.
It's a feature of *some* OO languages, and those who are fans of those
languages tend to decide to define it as a feature of OO itself.
Without MI, you couldn?t represent real world objects
as they are in the real world? When you?re doing your design, you model
things as they are in the real world, and therefore creating an accurate
representation of the things within your system.


My experience is that trying to make things just like they are in the
real world is a recipe for disaster in OO. I suspect we'll just have to
agree to disagree on this though.
However, because not all
the features of OO are supported within the language (C#, Java?) you need to
make implementation decision within your design? If the thing in the system
is derived from several other things, then surely the language should support
that? Good design will mean that MI only happens where it actually happens
in the real world.

And anyway, shouldn?t it be up to the designer at design time how
complicated a part of a system is, why should the language inhibit the
ability to create systems which represent the design? Bad design brings many
problems, coupling cohesion and MI problems? Good design prevails, let
people have MI.


The same argument can be (and has been) made about garbage collection -
why should we be "babied" in terms of memory allocation? We're smart
developers, let us handle it.


Blugh. Give me a simple language with garbage collection over a complex
language without it any day.

--
Jon Skeet - <sk***@pobox.com>
http://www.pobox.com/~skeet
If replying to the group, please do not mail me too

Nov 17 '05 #23
hi jon ,
i want to clerify you something MI is object oriented concept
and not feature of *some* OO languages
The same argument can be (and has been) made about garbage collection -
why should we be "babied" in terms of memory allocation? We're smart
developers, let us handle it.
and you can not compare it with Garbage collection
it is Memory managemant issue which should not be responcibility of smart
developer.
why C# implements inheritance also let it handeled by dev.and garbage
collection is handled by .net framwork not C#.
C# is oo Language,isn't it ?
so it should implement as much oo concept as it can at the cost of complexity.
I can understand there must be some complecities that might have prevented
language designers to implement this feature.
but i would be happy to see C# with all this complexities resolved at
language Design level which might be little more to acpect but ithink this
can be distinguishing feature of C#.

--
Have A Good Day,
Mahesh,
Ma************@yahoo.co.in
"Jon Skeet [C# MVP]" wrote:
Tom <To*@discussions.microsoft.com> wrote:
MI is a feature of OO.
It's a feature of *some* OO languages, and those who are fans of those
languages tend to decide to define it as a feature of OO itself.
Without MI, you couldn?t represent real world objects
as they are in the real world? When you?re doing your design, you model
things as they are in the real world, and therefore creating an accurate
representation of the things within your system.


My experience is that trying to make things just like they are in the
real world is a recipe for disaster in OO. I suspect we'll just have to
agree to disagree on this though.
However, because not all
the features of OO are supported within the language (C#, Java?) you need to
make implementation decision within your design? If the thing in the system
is derived from several other things, then surely the language should support
that? Good design will mean that MI only happens where it actually happens
in the real world.

And anyway, shouldn?t it be up to the designer at design time how
complicated a part of a system is, why should the language inhibit the
ability to create systems which represent the design? Bad design brings many
problems, coupling cohesion and MI problems? Good design prevails, let
people have MI.


The same argument can be (and has been) made about garbage collection -
why should we be "babied" in terms of memory allocation? We're smart
developers, let us handle it.


Blugh. Give me a simple language with garbage collection over a complex
language without it any day.

--
Jon Skeet - <sk***@pobox.com>
http://www.pobox.com/~skeet
If replying to the group, please do not mail me too

Nov 17 '05 #24
MAHESH MANDHARE <ma***************@yahoo.co.in> wrote:
i want to clerify you something MI is object oriented concept
and not feature of *some* OO languages
It all depends on your definition though. I'm sure there are people who
*define* OO to include MI, but there are also plenty who don't. I would
agree that it's an OO concept, but I disagree with the idea that it's
one which is a *necessary* part of every OO platform.
The same argument can be (and has been) made about garbage collection -
why should we be "babied" in terms of memory allocation? We're smart
developers, let us handle it.


and you can not compare it with Garbage collection
it is Memory managemant issue which should not be responcibility of smart
developer.
why C# implements inheritance also let it handeled by dev.and garbage
collection is handled by .net framwork not C#.


MI would have to be handled by the framework as well.
C# is oo Language,isn't it ?
I believe so, yes. You presumably don't, if you believe a language
*has* to support MI in order to be OO.
so it should implement as much oo concept as it can at the cost of complexity.
I can understand there must be some complecities that might have prevented
language designers to implement this feature.
but i would be happy to see C# with all this complexities resolved at
language Design level which might be little more to acpect but ithink this
can be distinguishing feature of C#.


It would have to be at the CLI level to avoid some horrible mismatches
when interoperating with other languages.

--
Jon Skeet - <sk***@pobox.com>
http://www.pobox.com/~skeet
If replying to the group, please do not mail me too
Nov 17 '05 #25
MAHESH MANDHARE <ma***************@yahoo.co.in> wrote:
i want to clerify you something MI is object oriented concept
and not feature of *some* OO languages
It all depends on your definition though. I'm sure there are people who
*define* OO to include MI, but there are also plenty who don't. I would
agree that it's an OO concept, but I disagree with the idea that it's
one which is a *necessary* part of every OO platform.
The same argument can be (and has been) made about garbage collection -
why should we be "babied" in terms of memory allocation? We're smart
developers, let us handle it.


and you can not compare it with Garbage collection
it is Memory managemant issue which should not be responcibility of smart
developer.
why C# implements inheritance also let it handeled by dev.and garbage
collection is handled by .net framwork not C#.


MI would have to be handled by the framework as well.
C# is oo Language,isn't it ?
I believe so, yes. You presumably don't, if you believe a language
*has* to support MI in order to be OO.
so it should implement as much oo concept as it can at the cost of complexity.
I can understand there must be some complecities that might have prevented
language designers to implement this feature.
but i would be happy to see C# with all this complexities resolved at
language Design level which might be little more to acpect but ithink this
can be distinguishing feature of C#.


It would have to be at the CLI level to avoid some horrible mismatches
when interoperating with other languages.

--
Jon Skeet - <sk***@pobox.com>
http://www.pobox.com/~skeet
If replying to the group, please do not mail me too
Nov 17 '05 #26
hi jon,

--
Have A Good Day,
Mahesh,
Ma************@yahoo.co.in
"Jon Skeet [C# MVP]" wrote:
MAHESH MANDHARE <ma***************@yahoo.co.in> wrote:
i want to clerify you something MI is object oriented concept
and not feature of *some* OO languages
It all depends on your definition though. I'm sure there are people who
*define* OO to include MI, but there are also plenty who don't. I would
agree that it's an OO concept, but I disagree with the idea that it's
one which is a *necessary* part of every OO platform.


It is not my defination or thought ,IT is one of the object oriented concept
and can not change depending on plenty who don't aggree.
see i am new to software and didm.t worked on languages which implements MI
that's why i can't argue with you on this point.
The same argument can be (and has been) made about garbage collection -
why should we be "babied" in terms of memory allocation? We're smart
developers, let us handle it.


and you can not compare it with Garbage collection
it is Memory managemant issue which should not be responcibility of smart
developer.
why C# implements inheritance also let it handeled by dev.and garbage
collection is handled by .net framwork not C#.


MI would have to be handled by the framework as well.
C# is oo Language,isn't it ?


I believe so, yes. You presumably don't, if you believe a language
*has* to support MI in order to be OO.

Language can be object oriented without support of features like
polymorphisum and other OO concept also.
so it should implement as much oo concept as it can at the cost of complexity.
I can understand there must be some complecities that might have prevented
language designers to implement this feature.
but i would be happy to see C# with all this complexities resolved at
language Design level which might be little more to acpect but ithink this
can be distinguishing feature of C#.
It would have to be at the CLI level to avoid some horrible mismatches
when interoperating with other languages.


can you suggest me what kind of horrible mistake it can cause with some
example.
I know some problems that MI can cause like one Described by bruce in the
same blog but there are solutions to that
If you know some other Please let me know

--
Jon Skeet - <sk***@pobox.com>
http://www.pobox.com/~skeet
If replying to the group, please do not mail me too

Nov 17 '05 #27
hi jon,

--
Have A Good Day,
Mahesh,
Ma************@yahoo.co.in
"Jon Skeet [C# MVP]" wrote:
MAHESH MANDHARE <ma***************@yahoo.co.in> wrote:
i want to clerify you something MI is object oriented concept
and not feature of *some* OO languages
It all depends on your definition though. I'm sure there are people who
*define* OO to include MI, but there are also plenty who don't. I would
agree that it's an OO concept, but I disagree with the idea that it's
one which is a *necessary* part of every OO platform.


It is not my defination or thought ,IT is one of the object oriented concept
and can not change depending on plenty who don't aggree.
see i am new to software and didm.t worked on languages which implements MI
that's why i can't argue with you on this point.
The same argument can be (and has been) made about garbage collection -
why should we be "babied" in terms of memory allocation? We're smart
developers, let us handle it.


and you can not compare it with Garbage collection
it is Memory managemant issue which should not be responcibility of smart
developer.
why C# implements inheritance also let it handeled by dev.and garbage
collection is handled by .net framwork not C#.


MI would have to be handled by the framework as well.
C# is oo Language,isn't it ?


I believe so, yes. You presumably don't, if you believe a language
*has* to support MI in order to be OO.

Language can be object oriented without support of features like
polymorphisum and other OO concept also.
so it should implement as much oo concept as it can at the cost of complexity.
I can understand there must be some complecities that might have prevented
language designers to implement this feature.
but i would be happy to see C# with all this complexities resolved at
language Design level which might be little more to acpect but ithink this
can be distinguishing feature of C#.
It would have to be at the CLI level to avoid some horrible mismatches
when interoperating with other languages.


can you suggest me what kind of horrible mistake it can cause with some
example.
I know some problems that MI can cause like one Described by bruce in the
same blog but there are solutions to that
If you know some other Please let me know

--
Jon Skeet - <sk***@pobox.com>
http://www.pobox.com/~skeet
If replying to the group, please do not mail me too

Nov 17 '05 #28
MAHESH MANDHARE <ma***************@yahoo.co.in> wrote:
It all depends on your definition though. I'm sure there are people who
*define* OO to include MI, but there are also plenty who don't. I would
agree that it's an OO concept, but I disagree with the idea that it's
one which is a *necessary* part of every OO platform.
It is not my defination or thought ,IT is one of the object oriented concept
and can not change depending on plenty who don't aggree.
see i am new to software and didm.t worked on languages which implements MI
that's why i can't argue with you on this point.


It is a concept which *can* be part of an OO platform, but exactly
where do you get the idea from that the definition you use is the "one
true" definition of OO?
C# is oo Language,isn't it ?


I believe so, yes. You presumably don't, if you believe a language
*has* to support MI in order to be OO. Language can be object oriented without support of features like
polymorphisum and other OO concept also.
No, there I'd disagree. Polymorphism *is* an absolute core fundamental
part of OO in my view.
It would have to be at the CLI level to avoid some horrible mismatches
when interoperating with other languages.


can you suggest me what kind of horrible mistake it can cause with some
example.


Horrible mismatches, not horrible mistakes.
I know some problems that MI can cause like one Described by bruce in
the same blog but there are solutions to that If you know some other
Please let me know


Well, there are problems that any MI implementation has to overcome,
such as the diamond of death. However, I was talking about the idea of
one language targetting the CLI supporting MI when the CLI itself
doesn't. How do you model it? I believe there's an implementation of
Smalltalk for .NET which does it using extra types which are
autogenerated all over the place - fine while you're using Smalltalk,
but a right pain as soon as someone tries to use your library from
another language such as C# or VB.NET.

--
Jon Skeet - <sk***@pobox.com>
http://www.pobox.com/~skeet
If replying to the group, please do not mail me too
Nov 17 '05 #29
MAHESH MANDHARE <ma***************@yahoo.co.in> wrote:
It all depends on your definition though. I'm sure there are people who
*define* OO to include MI, but there are also plenty who don't. I would
agree that it's an OO concept, but I disagree with the idea that it's
one which is a *necessary* part of every OO platform.
It is not my defination or thought ,IT is one of the object oriented concept
and can not change depending on plenty who don't aggree.
see i am new to software and didm.t worked on languages which implements MI
that's why i can't argue with you on this point.


It is a concept which *can* be part of an OO platform, but exactly
where do you get the idea from that the definition you use is the "one
true" definition of OO?
C# is oo Language,isn't it ?


I believe so, yes. You presumably don't, if you believe a language
*has* to support MI in order to be OO. Language can be object oriented without support of features like
polymorphisum and other OO concept also.
No, there I'd disagree. Polymorphism *is* an absolute core fundamental
part of OO in my view.
It would have to be at the CLI level to avoid some horrible mismatches
when interoperating with other languages.


can you suggest me what kind of horrible mistake it can cause with some
example.


Horrible mismatches, not horrible mistakes.
I know some problems that MI can cause like one Described by bruce in
the same blog but there are solutions to that If you know some other
Please let me know


Well, there are problems that any MI implementation has to overcome,
such as the diamond of death. However, I was talking about the idea of
one language targetting the CLI supporting MI when the CLI itself
doesn't. How do you model it? I believe there's an implementation of
Smalltalk for .NET which does it using extra types which are
autogenerated all over the place - fine while you're using Smalltalk,
but a right pain as soon as someone tries to use your library from
another language such as C# or VB.NET.

--
Jon Skeet - <sk***@pobox.com>
http://www.pobox.com/~skeet
If replying to the group, please do not mail me too
Nov 17 '05 #30

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: PlasmaDragon | last post by:
I have a class, let's call it "x". I have another class, y, which extends x. Then I have a class z which extends y. There is a function in y (but not in x) which I have overridden in z. But...
7
by: Hung Jung Lu | last post by:
Hi, I think Microsoft did look into Python when they designed C#. (E.g. they got rid of checked exceptions of Java.) However, they followed Java in avoiding multiple inheritance (MI), which is a...
30
by: Vla | last post by:
why did the designers of c++ think it would be more useful than it turned out to be?
20
by: km | last post by:
Hi all, In the following code why am i not able to access class A's object attribute - 'a' ? I wishto extent class D with all the attributes of its base classes. how do i do that ? thanks in...
22
by: Matthew Louden | last post by:
I want to know why C# doesnt support multiple inheritance? But why we can inherit multiple interfaces instead? I know this is the rule, but I dont understand why. Can anyone give me some concrete...
8
by: Gaetan | last post by:
hi i have 2 classes A1 and A2 implementing a problem with 2 different ways i also have 2 other classes X1 and X2 implementing an other problem i need classes that provide A1+X1 methods,...
60
by: Shawnk | last post by:
Some Sr. colleges and I have had an on going discussion relative to when and if C# will ever support 'true' multiple inheritance. Relevant to this, I wanted to query the C# community (the...
5
by: Debabrata Jana | last post by:
Dear Friends I have a confution..... In java all the class are extends java.lang.Object class. Now suppose you write a class ---- public class B extends A { //...
18
by: GD | last post by:
Please remove ability to multiple inheritance in Python 3000. Multiple inheritance is bad for design, rarely used and contains many problems for usual users. Every program can be designed only...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.