From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: X-Spam-Status: No, score=-1.3 required=5.0 tests=BAYES_00,INVALID_MSGID autolearn=no autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,2e11aa5522d5cc28 X-Google-Attributes: gid103376,public From: mheaney@ni.net (Matthew Heaney) Subject: Re: Mixing Ada and C++. Is a good idea? Date: 1997/11/15 Message-ID: #1/1 X-Deja-AN: 289805254 References: <345F7489.A10@si.ehu.es> Organization: Estormza Software Newsgroups: comp.lang.ada Date: 1997-11-15T00:00:00+00:00 List-Id: In article , gwinn@res.ray.com (Joe Gwinn) wrote: >Beware variant records in OO. Ada83 variant records have the well-known >property that if anything in any record in the variant set changes, >everybody who uses any member of that set must recompile. In practice, in >a project of any size, this means one recompiles the world just about >every day. If you're recompiling the world every day, then something is wrong with the design of the application, not with the language. This phenomenon often occurs when a "common types" package is being used, that contains a lot of low-cohesion type declarations that everyone with's. Add another type, and everyone who touches that package needs to be recompiled. You need to break the single, large, low-cohesion package up into several smaller packages, that each contains a set a high-cohesion types. That way, when you add another type, only that corner of the application that depends on that specific package needs to be recompiled. If you're doing a message passaging (perhaps the common types package declares a variant record containing all message types), then use the streams facility, so a package only depends on the predefined streams packages. You might even consider deriving message types from a Root_Message tagged type, so that message tags will be determined by the compiler. Better still is to use the distributed systems annex. -------------------------------------------------------------------- Matthew Heaney Software Development Consultant (818) 985-1271