Path: utzoo!utgpu!news-server.csri.toronto.edu!bonnie.concordia.ca!uunet!microsoft!jimad From: jimad@microsoft.UUCP (Jim ADCOCK) Newsgroups: comp.lang.c++ Subject: Re: Smart pointers and stupid people (was: garbage collection...) Message-ID: <70021@microsoft.UUCP> Date: 14 Jan 91 23:47:25 GMT References: <1990Dec20.045909.7681@rice.edu> <3071@lupine.NCD.COM> <3090@lupine.NCD.COM> <1991Jan2.205606.1020@lia> <60330@microsoft.UUCP> Reply-To: jimad@microsoft.UUCP (Jim ADCOCK) Distribution: comp Organization: Microsoft Corp., Redmond WA Lines: 39 In article cimshop!davidm@uunet.UU.NET (David S. Masterson) writes: >X-Posting-Software: GNUS 3.12 [ NNTP-based News Reader for GNU Emacs ] > >>>>>> On 7 Jan 91 23:15:17 GMT, jimad@microsoft.UUCP (Jim ADCOCK) said: > >Jim> C++ needs metaclass support. > >Does it? Or is there just a need for a standard functionality when dealing >with metaclasses? That is, metaclasses are not part of the language, but more >a part of a standard convention for using the language. My position on "metaclass support" is very simple: * Programming tasks commonly performed in C++ should be supported by the language. * Programming tasks commonly performed by the C preprocessor indicate a _lack_ of support for that task in the C++ language. * While templates should help in the creation of metaclass information, they won't help enough to keep people from using the C preprocessor for these tasks. Therefore templates are not sufficient to be considered metaclass support. * Creating metaclass-like information is commonly performed in C++. [Into the metaclass-like category I'd also lump "smart pointers" and "helper classes."] --- My [vague] idea of what metaclass support might be could be a set of template classes that are automatically created when a class is derived, without requiring a DECLARE_CLASS(foo, base) macro, or whatever. Not only are such macros ugly, unsafe, a pain to implement and debug, but they also leave open ample opportunity for subsequent class derivers to screw 'em up.