Xref: utzoo comp.lang.c++:13676 comp.std.c++:934 Newsgroups: comp.lang.c++,comp.std.c++ Path: utzoo!utgpu!news-server.csri.toronto.edu!torsqnt!geac!alias!rae From: rae@alias.com (Reid Ellis) Subject: Re: Class declaration/definition consistency Message-ID: <1991May25.180259.15945@alias.com> Sender: news@alias.com (0000-news(0000)) Organization: Alias Research, Inc., Toronto ON Canada References: <519f23cc.19260@apollo.HP.COM> <1991May24.172404.17625@kestrel.edu> Date: Sat, 25 May 1991 18:02:59 GMT Mark Purtill writes: |Let's call things like "class A;" *class declarations* and the actual |"class A {...};" the *class definition*. An easy way to solve this |problem would be to require a class declaration to list the bases |classes of the class defined. Scott Layson Burson writes: |I think this is an excellent idea. Note that if you change the inheritance hierarchy for a class, you now have to go all over the place and change it wherever the class is *declared*, as opposed to the one place where it is defined. It would make changing the hierarchy of class inheritance on the same order as that of changing the class interface. One might point out that changing the inheritance of a class might in fact change the interface however. But I would still argue that this should not be "required" but, rather, "optional" so as to prevent breaking all existing code that simply declares a class. Personally, when I declare a class, I use the "extern" keyword to make it obvious what it is that I am saying. e.g.: extern class A; extern class B; Reid -- Reid Ellis rae@utcs.toronto.edu || rae@alias.com CDA0610@applelink.apple.com || +1 416 362 9181 [work]