By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
449,264 Members | 1,743 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 449,264 IT Pros & Developers. It's quick & easy.

runtime Polymorphism ?????

P: n/a
LP
Hi, I understand the concept/definition of polymorphism. But what does the
term "runtime polymorphism" mean? I was asked to define it during a
technical interview. I gave a guy vanilla definition of polymorphism, but he
insisted on runtime. Did I miss a new buzzword while I was sick with the flu
last week or something like that?
Nov 16 '05 #1
Share this Question
Share on Google+
4 Replies


P: n/a
A quick google on it turns up a whold bunch of articles on "vanilla"
polymorphism, with no apparrent differences. Looks like just an alternative
wording.

"LP" <lp@a.com> wrote in message
news:%2****************@TK2MSFTNGP09.phx.gbl...
Hi, I understand the concept/definition of polymorphism. But what does the
term "runtime polymorphism" mean? I was asked to define it during a
technical interview. I gave a guy vanilla definition of polymorphism, but
he
insisted on runtime. Did I miss a new buzzword while I was sick with the
flu
last week or something like that?

Nov 16 '05 #2

P: n/a
Probably means virtual functions but it can also be a plugin. It is also
possible that this guy got it completely wrong.

Many definitions of plain vanilla definition of polymorphism are not
polymorphism at all in the strict sense of object oriented programmation;
however - and whatever the correctness of the answer - an interview based
on definitions usually mean that the guy doesn't really knows his stuff. A
technical interviewer should be able to ask technical questions; the kind of
questions whose answers will not be opened to various interpretations.

S. L.

"LP" <lp@a.com> wrote in message
news:%2****************@TK2MSFTNGP09.phx.gbl...
Hi, I understand the concept/definition of polymorphism. But what does the
term "runtime polymorphism" mean? I was asked to define it during a
technical interview. I gave a guy vanilla definition of polymorphism, but
he
insisted on runtime. Did I miss a new buzzword while I was sick with the
flu
last week or something like that?

Nov 16 '05 #3

P: n/a
Hi,

I believe that when one taks of runtime polymorphism, it really means of the
virtual functions and dynamic binding stuff.

Dynamic binding happens at runtime where in the objects are bound to type at
runtime depending on available business logic. Again Virtual Functions are
implemented and called on runtime based on user requests.

So can we term the above "Runtime Polimorphism"? Please suggest if I am
worng anywhere...

Ganesh

"LP" wrote:
Hi, I understand the concept/definition of polymorphism. But what does the
term "runtime polymorphism" mean? I was asked to define it during a
technical interview. I gave a guy vanilla definition of polymorphism, but he
insisted on runtime. Did I miss a new buzzword while I was sick with the flu
last week or something like that?

Nov 16 '05 #4

P: n/a
"LP" <lp@a.com> wrote in
news:#B**************@TK2MSFTNGP09.phx.gbl:
Hi, I understand the concept/definition of polymorphism. But
what does the term "runtime polymorphism" mean? I was asked to
define it during a technical interview. I gave a guy vanilla
definition of polymorphism, but he insisted on runtime. Did I
miss a new buzzword while I was sick with the flu last week or
something like that?


LP,

Like most computer science definitions, "polymorphism" is pretty well
defined when used in academic settings, but completely twisted
and abused when used in a commercial context.

A good academic definition can be found here:

http://en.wikipedia.org/wiki/Polymor...ter_science%29

C#'s inheritance mechanism is implemented by the compiler using
runtime polymorphism (i.e. virtual methods, dynamic runtime lookup
tables, late binding, etc...)

However, there are some people on the net who use the term "compile
time polymorphism" to refer to C#'s method overloading, like this
guy:

http://www.dickbaldwin.com/csharp/Cs000112.htm

(I personally have never heard the word "polymorphism" used to
describe method overloading.)

Other languages, like C++ and Ada, have a different kind of "compile
time polymorphism". In this case, a compiler can perform early
binding at compile time on at least some of the virtual methods that
are called in the code. Those virtual methods can then be called as
fast as non-virtual methods since there is no runtime lookup to
perform.

Google on the phrases "runtime polymorphism" and "compile time
polymorphism" to get more info.

--
Hope this helps.

Chris.
-------------
C.R. Timmons Consulting, Inc.
http://www.crtimmonsinc.com/
Nov 16 '05 #5

This discussion thread is closed

Replies have been disabled for this discussion.