|
-
Oct 2nd, 2009, 12:42 AM
#1
Re: Inheritance and Polymorphism
In VB.NET programming the "official" meaning of polymorphism is as Shaggy explained.
http://msdn.microsoft.com/en-us/library/z165t2xk.aspx
 Originally Posted by penagate
I have a more cynical view than the people above: I believe, in general, that most programming concepts are more widely used than they are understood
I have to agree with that. VB.NET programmers are using both inheritance and polymorphism all the time without even realising it. For instance, every time we use data-binding we are using polymorphism because, in WinForms, we can bind any object that implements the IList or IListSource interface. How many people bind data to a DataGridView in their first few weeks of VB programming without ever having heard of polymorphism or interfaces? Also, every single type we define inherits the Object class at least, so even the greenest newbie uses inheritance.
I think that both are pretty much unavoidable in VB.NET, especially inheritance. I think that they are alsoboth not necessarily well understood except by those with considerable experience, especially polymorphism. Even those with intermediate experience levels often don't have a full understanding of the implications of polymorphism, even if they can put it to use. That's one of the great things about .NET programming: complex principles are so ingrained that they can be utilised without having to think to hard.
-
Oct 2nd, 2009, 04:37 AM
#2
Re: Inheritance and Polymorphism
The way I was taught polymorphism in my degree was as Jenner described. That was in a java context though. In industry I've come across it more often as Shaggy described and that's usually been in a VB.Net or C++ context. That makes me think that the term isn't really properly defined and tends to get used slightly differently by different groups of programmers. That's just my impression though and one or the other might be 'official'. Oddly enough, it was that confusion that stopped me posting back about polymorphism - every time I tried I found I couldn't really articulate exactly what it was properly, let alone answer the questions Brent asked. Mind you, I guess that confusion goes some way to answering whether it's widely understood.
The best argument against democracy is a five minute conversation with the average voter - Winston Churchill
Hadoop actually sounds more like the way they greet each other in Yorkshire - Inferrd
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|