From mboxrd@z Thu Jan 1 00:00:00 1970 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 10f8a1,e7e13c943c611b62 X-Google-Attributes: gid10f8a1,public X-Google-Thread: 102b75,be3d6a6131c61fa7 X-Google-Attributes: gid102b75,public X-Google-Thread: 1164f8,be3d6a6131c61fa7 X-Google-Attributes: gid1164f8,public From: Greg Law Subject: Re: Exception handling Date: 1999/05/06 Message-ID: <373197F3.BA3DC720@cs.city.ac.uk>#1/1 X-Deja-AN: 474731180 Content-Transfer-Encoding: 7bit References: <36E9F2A0.9A401A09@pacific.net.sg> <924046418.053.46@news.remarQ.com> <7fv0ib$1kgem$1@xinwen.daimi.au.dk> Organization: Posted via ULCC Internet Services Content-Type: text/plain; charset=us-ascii Mime-Version: 1.0 Newsgroups: comp.arch,comp.sys.dec,vmsnet.alpha Erik Corry wrote: > > In comp.arch Zalman Stern wrote: > > > There is definitely room for improvement in binary interoperability in C++ > > environments. > > The problems are not restricted to differences between C++ > compilers and versions, but are also made worse by the normal > recommended C++ programming idiom where the sizes of all > objects are exposed through the .h files to the users of your > libraries who will put them on the stack, make arrays of them, > subclass them and generally do things that mean you can never > ever add as much as one single private member variable without > breaking binary compatibility with your old library versions. > > There are ways around this 'fragile base class' problem, of > course, where you put all the data in a separate object, or > make sure you have enough padding in your classes for future > expansion, but C++ doesn't actively support this way of doing > things, or check that you don't accidentally get it wrong. > > Qt and Be's libraries suffer from this. I imagine any C++-based > library will. But without separating implementation from interface, how do you do this? Sure, such separation is generally a good thing, only it costs. C++ classes can efficiently represent quite small things - when you add the level of indirection necessary to separate interface from implementation then you get "proper OO", but you need coarse granularity of objects to run at the same speed. C++ was never intended to do what you're asking of it - if you want that, use another language. If you want speed, use C++ Greg. > > -- > Erik Corry erik@arbat.com Ceterum censeo, Microsoftem esse delendam!