Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!usc!apple!lsr From: lsr@Apple.COM (Larry Rosenstein) Newsgroups: comp.sys.mac.programmer Subject: Re: MacApp & C++ destructors Message-ID: <13080@goofy.Apple.COM> Date: 16 Apr 91 00:30:23 GMT References: <9827@etsu.CMI.COM> <1991Apr13.235903.26110@ux1.cso.uiuc.edu> <1991Apr14.015647.3521@verity.com> Organization: Apple Computer, Inc. Lines: 26 In article <1991Apr14.015647.3521@verity.com> anders@verity.com (Anders Wallgren) writes: > >This is one of the penalties of using an Object Pascal library from >C++ - you also can't use multiple inheritance and I think overloading >is also a no-no. Strictly speaking, this isn't true. Just because you are linking with MacApp doesn't mean you can't use the full power of C++ in classes that you write. You can implement the internals of your app with "native" C++ objects if you choose. Anders is right, however, that if you make a subclass of TObject or any other MacApp class then you are restricted in the features of C++ you may use. You can't use overloaded virtual functions, but I think you can use overloaded non-virtual functions. (This can be useful in order to define convenience functions that simply turn around and call a normal virtual function. For example, operator+ can calls Add. If you make these inline, then there's no extra function call.) -- Larry Rosenstein, Apple Computer, Inc. lsr@apple.com (or AppleLink: Rosenstein1)