Why din't MS include Multile inheritance in C#?
-
Multiple inheritance is one of those really contentious issues with advocates on both sides arguing that they have the only right answer. Anyway - Anders Hejlberg decided against it (partly because .NET doesn't natively support MI - although Eifell.NET has included the ability to use MI), but his position does seem to be changing on this issue.
Deja View - the feeling that you've seen this post before.
Pete O`Hanlon wrote:
partly because .NET doesn't natively support MI
Im sure I read recently that the framework does support MI, but the implementation of it raises its own quirks... so they left it out until they decide exactly how it should be implemented. The same article talked about mixins as a possible alternative. Personally I hate both MI and mixins. Sorry I don't have a link to the article, I'll trawl through my history and see if I can find it.
-
Pete O`Hanlon wrote:
partly because .NET doesn't natively support MI
Im sure I read recently that the framework does support MI, but the implementation of it raises its own quirks... so they left it out until they decide exactly how it should be implemented. The same article talked about mixins as a possible alternative. Personally I hate both MI and mixins. Sorry I don't have a link to the article, I'll trawl through my history and see if I can find it.
thanks to all you guys, but what should i tell the interviewer? Possible answers I got by posting this question: 1. Its complex if its implemented 2. More disadvantages than advantages 3. .NET doesnt natively support MI 4. implementing MI creates problems If you were asking me this question in an interview, what answer would you expect Jamie? Regards, Blumen
-
thanks to all you guys, but what should i tell the interviewer? Possible answers I got by posting this question: 1. Its complex if its implemented 2. More disadvantages than advantages 3. .NET doesnt natively support MI 4. implementing MI creates problems If you were asking me this question in an interview, what answer would you expect Jamie? Regards, Blumen
If I was asking you this question in an interview i'd be an idiot. Not only is it totally irrelevant to day-to-day programming but it sounds as if this guy is either a) A C++ evangelist who is trying to have a bash at c#'s "lack of MI" b) An idiot who has heard a buzzword and is trying to look intelligent. Try asking him why he thinks that MI is relevant to the job and watch him either give a tirade about how wonderful MI is (a) or splutters and changes the subject (b).
-
If I was asking you this question in an interview i'd be an idiot. Not only is it totally irrelevant to day-to-day programming but it sounds as if this guy is either a) A C++ evangelist who is trying to have a bash at c#'s "lack of MI" b) An idiot who has heard a buzzword and is trying to look intelligent. Try asking him why he thinks that MI is relevant to the job and watch him either give a tirade about how wonderful MI is (a) or splutters and changes the subject (b).
Amen to that.
Deja View - the feeling that you've seen this post before.
-
Hi, Why din't Microsoft include Multile inheritance in C#? This was asked to me by an interviewer, I couldn't answer this properly. The guy said there was some reason why they din't include multiple inheritance, which he din't tell me. Regards, Blumen
-
If I was asking you this question in an interview i'd be an idiot. Not only is it totally irrelevant to day-to-day programming but it sounds as if this guy is either a) A C++ evangelist who is trying to have a bash at c#'s "lack of MI" b) An idiot who has heard a buzzword and is trying to look intelligent. Try asking him why he thinks that MI is relevant to the job and watch him either give a tirade about how wonderful MI is (a) or splutters and changes the subject (b).
This is a meta-question. At best the people responsible for the C# definition can answer this; everyone else can only guess. Whoever asks this does not intend to be called an idiot, he intends to observe the interviewee's reaction. Not every question is about knowledge... :)
Luc Pattyn [Forum Guidelines] [My Articles]
this weeks tips: - make Visual display line numbers: Tools/Options/TextEditor/... - show exceptions with ToString() to see all information - before you ask a question here, search CodeProject, then Google
-
Hi, Why din't Microsoft include Multile inheritance in C#? This was asked to me by an interviewer, I couldn't answer this properly. The guy said there was some reason why they din't include multiple inheritance, which he din't tell me. Regards, Blumen
Hedging their bets; it's easier to add it in later than to remove it. :-D
-
thanks to all you guys, but what should i tell the interviewer? Possible answers I got by posting this question: 1. Its complex if its implemented 2. More disadvantages than advantages 3. .NET doesnt natively support MI 4. implementing MI creates problems If you were asking me this question in an interview, what answer would you expect Jamie? Regards, Blumen
I think none of the answers is really convincing. Maybe you should answer that we cannot know the motivation of the guys not to include it. Simplicity and avoiding errors might be an argument. On the other hand C# is not a simple language. It includes many complex and new features. If you have the feeling the interviewer is not a fan of multiple inheritance you might say MI is an interesting idea, but you do not really need it in practical situations.
Rudolf Heijink
-
If I was asking you this question in an interview i'd be an idiot. Not only is it totally irrelevant to day-to-day programming but it sounds as if this guy is either a) A C++ evangelist who is trying to have a bash at c#'s "lack of MI" b) An idiot who has heard a buzzword and is trying to look intelligent. Try asking him why he thinks that MI is relevant to the job and watch him either give a tirade about how wonderful MI is (a) or splutters and changes the subject (b).
:) :) :) May be he was not a idiot afterall, he just din't want me in his team coz they were looking for a person with more experience. hmm, anyway I always feel like asking the interviewer answers to his questions but I back off thinking that most of them don't like to be questioned!
-
I think none of the answers is really convincing. Maybe you should answer that we cannot know the motivation of the guys not to include it. Simplicity and avoiding errors might be an argument. On the other hand C# is not a simple language. It includes many complex and new features. If you have the feeling the interviewer is not a fan of multiple inheritance you might say MI is an interesting idea, but you do not really need it in practical situations.
Rudolf Heijink
Hi Rudolf, I told him it would make the language complex, but then he started asking "how complex"? I am new to C# and programming as a whole, and I dint know how complex it would make the language. This is my experience in an interview where people don't want to ask you obvious questions. I used to google for interview questions and appear for the interview, but I failed miserably two times. I feel bad when I think about these interviews. I want to dig deep in to topics, but when I start asking why (mostly to Google) something is done this way in .NET framework, rarely do I get good answers (articles/posts). How do you find answers to your questions, how do you get knowledgable? Regards, Blumen
-
Hi Rudolf, I told him it would make the language complex, but then he started asking "how complex"? I am new to C# and programming as a whole, and I dint know how complex it would make the language. This is my experience in an interview where people don't want to ask you obvious questions. I used to google for interview questions and appear for the interview, but I failed miserably two times. I feel bad when I think about these interviews. I want to dig deep in to topics, but when I start asking why (mostly to Google) something is done this way in .NET framework, rarely do I get good answers (articles/posts). How do you find answers to your questions, how do you get knowledgable? Regards, Blumen
blumenhause wrote:
How do you find answers to your questions, how do you get knowledgable?
There are a lot of different ways:
- Reading books
- On your own investigating - write some code, see what it does and how it behaves
- Using tools like Reflector to see what/how the base class libraries do things
- Ask questions of people that have more experience and/or are more knowlegeable than you on a particular topic.
Since you are new to programming and C# (and also, it appears, to technical interviews), the thing to remember is this: There are two types of interviewers: The kind that wants to show off how much he/she knows and the kind that wants to know how much you know and how you react to difficult/challenging questions. The first type of interviewer is difficult to deal with at best as they tend to ask the "impossible" questions and drill into topics that are intentionally hard. The goal is to show you how smart they are and doesn't really help anybody. The second type of interviewer will also ask difficult questions, but the entire interview won't consist of them. This is the person that will ask a mixture of easy to hard questions to try and understand how much you know on a particular topic and what your problem solving skills are. Even after 15 years of experience I have been on interviews where I was asked a question that stumped me. It's always OK to say you don't know rather than trying to guess and get it wrong.
Scott.
—In just two days, tomorrow will be yesterday. [Forum Guidelines] [Articles] [Blog]
-
blumenhause wrote:
How do you find answers to your questions, how do you get knowledgable?
There are a lot of different ways:
- Reading books
- On your own investigating - write some code, see what it does and how it behaves
- Using tools like Reflector to see what/how the base class libraries do things
- Ask questions of people that have more experience and/or are more knowlegeable than you on a particular topic.
Since you are new to programming and C# (and also, it appears, to technical interviews), the thing to remember is this: There are two types of interviewers: The kind that wants to show off how much he/she knows and the kind that wants to know how much you know and how you react to difficult/challenging questions. The first type of interviewer is difficult to deal with at best as they tend to ask the "impossible" questions and drill into topics that are intentionally hard. The goal is to show you how smart they are and doesn't really help anybody. The second type of interviewer will also ask difficult questions, but the entire interview won't consist of them. This is the person that will ask a mixture of easy to hard questions to try and understand how much you know on a particular topic and what your problem solving skills are. Even after 15 years of experience I have been on interviews where I was asked a question that stumped me. It's always OK to say you don't know rather than trying to guess and get it wrong.
Scott.
—In just two days, tomorrow will be yesterday. [Forum Guidelines] [Articles] [Blog]
-
Hi, Why din't Microsoft include Multile inheritance in C#? This was asked to me by an interviewer, I couldn't answer this properly. The guy said there was some reason why they din't include multiple inheritance, which he din't tell me. Regards, Blumen