4 ms·
I'm surprised you would say that there "hundreds of different definitions" of polymorphism. Here's one of the top-ranked results for the term: http://stackover
by bshimmin 12y ago
I'm surprised you would say that there "hundreds of different definitions" of polymorphism. Here's one of the top-ranked results for the term: http://stackoverflow.com/questions/1031273/what-is-polymorphism-what-is-it-for-and-how-is-it-used http://stackoverflow.com/questions/1031273/what-is-polymorph...
If you look at the answers, aside from a few that are really poorly phrased, they all fundamentally say the same thing.
If I were interviewing someone and asking them about polymorphism, I would expect a definition which shows understanding and perhaps an example which explains to me that they really do understand it in concrete terms. (I'd probably give them bonus points for mentioning what the Greek words mean, but only because someone who knows that is likely to be someone I'd enjoy working with.)
Inheritance is certainly a dicier subject. I'm not 100% sure I'd ask about either polymorphism or inheritance in an interview nowadays (though I certainly have in the past), but if I were asking about the latter, I'd probably phrase it in the specific context of a particular language - or perhaps request a comparison of how inheritance differs between two languages. I guess, really, I'd actually want a discussion about inheritance versus composition - but, having asked for just that in the past, it was quite surprising to me (at the time) how many people had literally no idea what the term "composition" meant (despite, I'm sure, using it on a daily basis).
- rwallace 12y ago> (I'd probably give them bonus points for mentioning what the Greek words mean, but only because someone who knows that is likely to be someone I'd enjoy working with.) I know what the Greek words mean, but it would never in a million years occur to me to mention it in an interview; I would have no way of knowing without being told that you would assign positive value to such.
- bshimmin 12y agoI'm certain the vast majority of interviewers wouldn't care in the slightest if you demonstrated that knowledge; I just happen to have a degree in classics and thus a bias towards such things! (Not that knowing the meaning of two fairly common Greek roots really demonstrates much knowledge of classical languages, but there we are.)