News for hackers. Stuff that matters.
Re:Why C++ Is Not "Back" by Luyt on Sunday December 02, 2012 @08:32AM (#4861120)
I once got this question from an interviewer, who was a senior dev on the project:

"What is a vtable?"

My answer was that it was the way in which a C++ compiler makes it possible to do polymorphism (calling base member methods through pointers to derived classes; virtual functions). The interviewer didn't agree with me and said that vtables have nothing to do with polymorphism and moved on to another question (about :: scoping). I didn't start to argue with him, and I got the job.

Re:Why C++ Is Not "Back" by jpatte on Sunday December 02, 2012 @10:25AM (#4861426)
That may be because there are several forms of polymorphism. What you had in mind was subtype polymorphism (aka substitution), while he might have had another form in mind like parametric polymorphism (aka generics). http://en.wikipedia.org/wiki/Polymorphism_(computer_science)

Btw I assume you meant "calling derived member methods through pointers to base classes" instead.

Re:Why C++ Is Not "Back" by Luyt on Tuesday December 04, 2012 @11:28PM (#4874881)
Yes, you are correct. I meant something like: animal->move_random(), where animal can be a dog, cat, or even a bird (with an extra z coordinate ;-).