Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!samsung!know!zaphod.mps.ohio-state.edu!uakari.primate.wisc.edu!aplcen!uunet!microsoft!jimad From: jimad@microsoft.UUCP (Jim ADCOCK) Newsgroups: comp.std.c++ Subject: Re: Randomly ordered fields !?!? (Was: "packed" objects) Message-ID: <56942@microsoft.UUCP> Date: 27 Aug 90 17:28:16 GMT References: <56638@microsoft.UUCP> <1229@lupine.NCD.COM> <56744@microsoft.UUCP> <1313@lupine.NCD.COM> Reply-To: jimad@microsoft.UUCP (Jim ADCOCK) Organization: Microsoft Corp., Redmond WA Lines: 15 In article dl@g.oswego.edu writes: | |Perhaps among the best arguments for allowing compilers to at least |sometimes reorder fields is to simply make conceivable someday the use |of C++ adaptations of the clever MI layout algorithms described in |Pugh & Weddell's SIGPLAN '90 conference paper. Also, at the other end of the performance spectrum, imagine creating an interactive C++ "interpreter" or actually p-coded compiler. The goal is to have minimal recompilation and relinking, in order to minimize the response time to changes. One simple scheme to accomplish this would be to not embed objects, inherit via pointer, and always tack new fields to the end of an "object's" structure. This would violate today's field ordering constraints [unless the user always added new fields to the end of a labeled section.]