Path: utzoo!censor!geac!becker!hybrid!scifi!bywater!uunet!microsoft!martino From: martino@microsoft.UUCP (Martin O'RIORDAN) Newsgroups: comp.std.c++ Subject: Re: ::Foo() Message-ID: <59558@microsoft.UUCP> Date: 4 Dec 90 20:48:59 GMT References: <1990Nov21.152532.5147@ssd.kodak.com> Reply-To: martino@microsoft.UUCP (Martin O'RIORDAN) Distribution: usa Organization: Microsoft Corp., Redmond WA Lines: 32 In article <1990Nov21.152532.5147@ssd.kodak.com> randolph@ssd.kodak.com (Gary L. Randolph) writes: > new (someAddr) ::Foo(); as a proposed 'extension' to C++. It must be noted that this already has a valid meaning in C++. It is interpretted as the creation of an instance of the global type 'Foo' (as opposed to any nested type 'Foo') with a placement argument 'someAddr' and using the default constructor for the global type 'Foo'. This is not a free hole in the C++ syntax. There are other reasons why this is a dangerous idea. The C++ language does not imply the existance of these tables, or the pointers to them. They are in fact a manifestation of typical implementations of the C++ language. In a system which can resolve apparently polymorphic calls into monomorphic calls, virtual function tables, and their corresponding pointers may be eliminated. Systems which support 'Tagged' hardware architectures may be able to manage polymorphic behaviour using associative hardware mechanism, thus eliminating the need for these pointers altogether. I am all for being able to describe highly flexible persistant mechanisms, but they must be described by language proscribed methods, and not using "under-the-hood" techniques. Currently proposals for supporting MetaClasses in C++ are starting to appear. Indeed I have been doing this kind of thing myself for nearly five years in C++. These metaclasses will have either a language interface, or a standard library interface, and will allow the polymorphic serialisation mechanisms you need to describe persistant models very well. Martin O'Riordan C++ Development Lead, Microsoft