473,657 Members | 2,420 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

runtime Polymorphism ?????

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
4 7389
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******** ********@TK2MSF TNGP09.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
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******** ********@TK2MSF TNGP09.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
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
"LP" <lp@a.com> wrote in
news:#B******** ******@TK2MSFTN GP09.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, "polymorphi sm" 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 "polymorphi sm" 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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

37
2823
by: Mike Meng | last post by:
hi all, I'm a newbie Python programmer with a C++ brain inside. I have a lightweight framework in which I design a base class and expect user to extend. In other part of the framework, I heavily use the instance of this base class (or its children class). How can I ensure the instance IS-A base class instance, since Python is a fully dynamic typing language? I searched and found several different ways to do this:
18
12579
by: Ken | last post by:
Hi. Can anyone refer me to any articles about the compatibility between c++ polymorphism and real-time programming? I'm currently on a real-time c++ project, and we're having a discussion about whether we should allow polymorphism. Our system is not embedded and does not need to be as real-time as, say, a pacemaker. But it does involve updating displays based on radar input. So a need for something close to real-time is desired...
4
2279
by: AdamM | last post by:
How can I change an object's type at runtime? For example, here's what I want to do in psedocode: object animal; if (dog) { animal=(dog)animal;
4
4942
by: arunvnk | last post by:
It is not quite clear why the compiler uses rntime polymorphism when the virtual keyword is specified. Since the virtual Keyword is specified,why can't the compiler decide at the runtime itself,which function is to be called,even if the function is called by the base class pointer??
2
2021
by: eric.dennison | last post by:
In the sample below: testClass is derived from object. We can cast object to testClass, no problem We can cast testClass to object no problem Compiler is ok with cast object to testClass but fails at runtime. Why?
7
4319
by: doina | last post by:
Hello, Can I have runtime polymorphism using references. I knew that runtime polymorphism could be obtained only by pointers, but now I have tried this in Visual C++ 8.0: #include <iostream> using namespace std;
11
2963
by: chsalvia | last post by:
I've been programming in C++ for a little over 2 years, and I still find myself wondering when I should use polymorphism. Some people claim that polymorphism is such an integral part of C++, that anybody who doesn't use it might as well just program in plain C. I totally disagree with this, because I think C++ has a lot of great features apart from polymorphism, such as the ability to organize code into classes, code reuse through...
16
5418
by: desktop | last post by:
I have read that using templates makes types know at compile time and using inheritance the types are first decided at runtime. The use of pointers and casts also indicates that the types will first be know at runtime. But is there some strict definitions that defines runtime code and compile time code that can be used in general?
8
6787
by: Ralf Goertz | last post by:
Hi, I want to do able to declare an object bar of a templated class foo where the actual template type of foo is only know at runtime: ----- #include <string> template <class Tclass foo {
0
8395
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
8732
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
8503
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
8605
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
7330
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
0
5632
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
4155
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
2
1955
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
2
1615
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.