Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!sun-barr!apple!netcomsv!sjsumcs!horstman From: horstman@mathcs.sjsu.edu (Cay Horstmann) Newsgroups: comp.lang.c++ Subject: Borland language extension virtual function = [ ... ]; Message-ID: <1991Jun27.130247.5107@mathcs.sjsu.edu> Date: 27 Jun 91 13:02:47 GMT Organization: San Jose State University - Math/CS Dept. Lines: 41 I just attended a product presentation by a Borland guy on their class library for Microsoft Windows called ObjectVision. I was somewhat distressed to see an odd construct class MyWindow : public TWindow { // ... public:: virtual void paint() = [ WM_START + WM_PAINT ]; // ... }; (I am quoting from memory, so the details may not be correct 100%). The idea is that the paint() function would be selected when the WM_PAINT message is sent from MS Windows. They have a fancy name for this, dynamic message dispatching. Did anyone see this before? Supposedly it is supported in BCC 2.0. Is the mechanism really tied to MS Windows, or does it something useful in a general construct? The speaker (I believe the project head for ObjectVision--can't remember his name) insisted that this did not violate any C++ standard, being "merely" an extension. To me, this sounds like utter nonsense. Assuming for the moment that the feature is indeed closely tied to Windows (or maybe other event- driven UI that use small integers as message ID's), one of two things will happen: Nobody else will support it, and Borland C++ (otherwise an admirable product) will be on the route that killed Pascal, with proprietary extensions in every implementation. Every DOS vendor must support it to stay compatible, and Borland manages to place a true wart into the de facto language without even bothering to go through the ANSI committee. Maybe other netters have more info on this. My impression that the speaker was an evil person was amplified when, upon his question what Borland could do for us, I told him "Improve the Usenet support", and he answered "The what?". Cay