|
-
October 20th, 2011, 10:35 PM
#16
Re: difference between polymorphism and overloading
 Originally Posted by nuzzle
Well, you got the gist didn't you.
C++ programmers usually have a quite limited outlook of what constitutes polymorphism. A broader view requires you to consider type systems and then there are four basic forms of polymorphism namely coersion, overloading, inclusion and parametric.
With this information you can safely go on learning C++ enjoying the benefits of a very polymorphic type system. What's been said in this thread will become clear to you eventually. Good luck. 
Thank you for the luck! 
Regards
H
-
October 21st, 2011, 07:07 AM
#17
Re: difference between polymorphism and overloading
 Originally Posted by nuzzle
C++ programmers usually have a quite limited outlook of what constitutes polymorphism.
Must be having another senior moment.
ahoodin
To keep the plot moving, that's why.

-
October 23rd, 2011, 01:29 AM
#18
Re: difference between polymorphism and overloading
 Originally Posted by ahoodin
Must be having another senior moment.
Yes sometimes you forget that you never knew.
-
October 23rd, 2011, 04:09 PM
#19
Re: difference between polymorphism and overloading
Nope it would be you. You are the Senior member who forgets how to behave and has the senior moments. And I mean plural, because you have had many of them over the past year. You think that you can just blurt anything out about C++ programmers. It is you who have the limited view of C++ programmers. You with the smart allec comments, and you who needs to learn manners.
ahoodin
To keep the plot moving, that's why.

-
October 24th, 2011, 12:54 AM
#20
Re: difference between polymorphism and overloading
 Originally Posted by ahoodin
Nope it would be you. You are the Senior member who forgets how to behave and has the senior moments. And I mean plural, because you have had many of them over the past year. You think that you can just blurt anything out about C++ programmers. It is you who have the limited view of C++ programmers. You with the smart allec comments, and you who needs to learn manners.
Thank you for expanding my view on C++ programmers. Always well-mannered and never a senior moment right. Maybe I should ask one for a date. You don't happen to be ...
But that won't change the facts. The predominant usage of the term polymorphism in the C++ community is limited compared with how it's used in the broader context of type systems.
Last edited by nuzzle; October 24th, 2011 at 03:59 AM.
-
October 24th, 2011, 07:12 AM
#21
Re: difference between polymorphism and overloading
Are those really your professional ideas? Awesome, Wow!
Simply Brilliant. Your nothing but a common Troll.
Last edited by ahoodin; October 24th, 2011 at 07:25 AM.
ahoodin
To keep the plot moving, that's why.

-
October 24th, 2011, 09:00 AM
#22
Re: difference between polymorphism and overloading
 Originally Posted by ahoodin
Are those really your professional ideas? Awesome, Wow!
Simply Brilliant. Your nothing but a common Troll.
Mind your manners. Use arguments not defamating comments.
It's not an idea, it's an observation. This is very typical,
http://www.cplusplus.com/doc/tutorial/polymorphism/
I quote,
"One of the key features of derived classes is that a pointer to a derived class is type-compatible with a pointer to its base class. Polymorphism is the art of taking advantage of this simple but powerful and versatile feature, that brings Object Oriented Methodologies to its full potential."
My emphasis. Sometimes also the mechanism of overloading is included in the concept of polymorphism and contrasted with the above and you get the "static vs. dynamic" distinction.
Ask a C++ programmer about polymorphism and the above is the answer you're most likely to get. I'm not saying it's wrong or bad. But it's a limited view of what constitutes polymorphism.
Last edited by nuzzle; October 24th, 2011 at 09:07 AM.
-
October 24th, 2011, 09:13 AM
#23
Re: difference between polymorphism and overloading
 Originally Posted by nuzzle
Some go even further and consider polymorphism to be synonymous with the C++ virtual method dispatch mechanism
This is because of the c++ standard. The only type of polymorphic behavior that goes by its direct effect is class polymorphism
 Originally Posted by nuzzle
but that won't change the facts. The predominant usage of the term polymorphism in the C++ community is limited compared with how it's used in the broader context of type systems.
That is because c++ doesn't have another terminology for class polymorphism and therefore is typically referred to as polymorphism in general. I surely know how to use other types of polymorphism. The only thing I have to know is the c++ terminology when dealing with c++. So I go by c++ terminology like type casting since this is what the c++ standard goes by and not polymorphic coercion. So yes I know polymorphic coercion, inclusion polymorphism( aka subtype ), ad-hoc polymorphism, parametric polymorphism and whatever else is polymorphic in c++ by its terminology in c++.
 Originally Posted by nuzzle
I quote,
"One of the key features of derived classes is that a pointer to a derived class is type-compatible with a pointer to its base class. Polymorphism is the art of taking advantage of this simple but powerful and versatile feature, that brings Object Oriented Methodologies to its full potential."
..................
Ask the average C++ programmer about polymorphism and the above is the answer you get. I'm not saying it's wrong. But it's a limited view of what constitutes polymorphism.
c++ is oop and that is what c++ mandates as polymorphism directly
 Originally Posted by c++11 10.3
Virtual functions support dynamic binding and object-oriented programming. A class that declares or
inherits a virtual function is called a polymorphic class.
So it does make since to use c++ terminology directly and not necessary how polymorphism applies to every part of the language in general.
0100 0111 0110 1111 0110 0100 0010 0000 0110 1001 0111 0011 0010 0000 0110 0110 0110 1111 0111 0010
0110 0101 0111 0110 0110 0101 0111 0010 0010 0001 0010 0001 0000 0000 0000 0000 0000 0000 0000 0000
-
October 24th, 2011, 09:24 AM
#24
Re: difference between polymorphism and overloading
 Originally Posted by Joeman
So it does make since to use c++ terminology directly and not necessary how polymorphism applies to every part of the language in general.
Sure. Other languages do the same.
But the OP found it confusing and I thought he may benefit from the broader picture and not just the common C++ view only.
-
October 24th, 2011, 09:31 AM
#25
Re: difference between polymorphism and overloading
 Originally Posted by nuzzle
It's not an idea, it's an observation.
I observe that my post #12 and Lindley's post #13 did not get ahoodin so riled up, probably because I used "we (...) in C++", Lindley spoke about "C++", and we made objective statements about what is the norm with respect to C++, rather than use a phrase like "quite limited outlook" to contrast with "broader view" that can be intepreted as an aspersion on "C++ programmers" as a group from which you are trying to dissociate yourself. I doubt that these were your intentions, but phrased as such, I can see why ahoodin felt you were trolling.
 Originally Posted by nuzzle
I thought he may benefit from the broader picture and not just the common C++ view only.
I agree.
-
October 24th, 2011, 09:59 AM
#26
Re: difference between polymorphism and overloading
 Originally Posted by ahoodin
[directed @ nuzzle] You think that you can just blurt anything out about C++ programmers.
Lol. From my experience, nuzzle has a habit of defending C++, funny that you now put him in the "other camp". XD
 Originally Posted by ahoodin
Must be having another senior moment.
Sure, we've all seen that nuzzle has his moments, but I think you're just overreacting to his comment - which wasn't particularly offensive, or ill-tempered. As far as I know nuzzle is a C++ programmer himself, at least among other things.
It's good to have a more brother view of things, and specifically in this case, we all can agree that the idea of polymorphism is not something language-specific.
Yes, you may never need to deal with it outside the context of C++, but it is important to make the distinction between what it fundamentally is, and how it manifests itself in the language mechanisms of C++. Then you can realize that it doesn't have to stop there, and that having this broader view will make you a better programmer, and it just might come in handy some day, when thinking out of the box is required.
-
October 24th, 2011, 10:22 AM
#27
Re: difference between polymorphism and overloading
I agree knowing how things work and why is important. That is why I like computers in the first place They are quite complicated.
0100 0111 0110 1111 0110 0100 0010 0000 0110 1001 0111 0011 0010 0000 0110 0110 0110 1111 0111 0010
0110 0101 0111 0110 0110 0101 0111 0010 0010 0001 0010 0001 0000 0000 0000 0000 0000 0000 0000 0000
-
October 24th, 2011, 10:59 AM
#28
Re: difference between polymorphism and overloading
 Originally Posted by laserlight
I can see why ahoodin felt you were trolling.
Sure, even in the most polite and correct C++ professional lurks a hooligan ready to strike out on the slightest hint his subculture is attacked.
Help, I did it again didn't I
-
October 24th, 2011, 11:21 AM
#29
Re: difference between polymorphism and overloading
 Originally Posted by nuzzle
Help, I did it again didn't I
Don't blame me if ahoodin zaps you with a laser, or more likely polymorphs you into a sheep
-
October 24th, 2011, 11:30 AM
#30
Re: difference between polymorphism and overloading
 Originally Posted by nuzzle
Sure, even in the most polite and correct C++ professional lurks a hooligan ready to strike out on the slightest hint his subculture is attacked.
Help, I did it again didn't I 
That was senior moment 1736. You might want to keep your day job because standup just isn't your thing.
ahoodin
To keep the plot moving, that's why.

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
|