Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!mnetor!uunet!mcvax!tnosel!hvt From: hvt@tnosel.UUCP (henq) Newsgroups: comp.lang.c++ Subject: no dynamic binding in c++ ? Message-ID: <481@tnosel.UUCP> Date: Wed, 7-Oct-87 10:41:32 EDT Article-I.D.: tnosel.481 Posted: Wed Oct 7 10:41:32 1987 Date-Received: Sat, 10-Oct-87 18:05:23 EDT Lines: 25 Hi, In the recent debate on C++ vs. Objective-C, I read remarks like: "c++ does not provide dynamic binding, only virtual functions". Virtual functions seem very powerfull to me. You can write type-independant code with them like on page -37- of the Stroustrup book: shape_vec[i].rotate(45); Only at runtime can be determined what type of object occupies position [i] of shape_vec, that seems dynamic binding to me. What does 'real' dynamic binding offer you that virtual functions don't ? Has it something to do with the strict tree-like hierarchy of inheritance ? If c++ *does* privide dynamic binding, a runtime support for this must be generated by the pre-processor, right ? Can somebody please elaborate on this on the amateur level ? -Henk Have a nice day