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: 109fba,9ac62ca34a465706 X-Google-Attributes: gid109fba,public X-Google-Thread: 103376,9ac62ca34a465706 X-Google-Attributes: gid103376,public From: Jerome Desquilbet Subject: Re: on OO differnces between Ada95 and C++ Date: 1996/02/20 Message-ID: <3129F185.41C6@Rational.COM>#1/1 X-Deja-AN: 140300164 references: <4gbq7q$g08@qualcomm.com> to: Nasser Abbasi content-type: text/plain; charset=us-ascii organization: Rational Software Corporation, France mime-version: 1.0 newsgroups: comp.lang.ada,comp.lang.c++ x-mailer: Mozilla 2.0 (X11; I; OSF1 V3.2 alpha) Date: 1996-02-20T00:00:00+00:00 List-Id: Nasser, You have pointed out one of the main differences between Ada and C compilation models (and as far as the compilation model is concerned, Ada 95 is not different from Ada 83, and C++ is not different from C). - The C/C++ compilation paradigm is _independent_ compilation. - The Ada 83/95 compilation paradigm is _separate_ compilation. It has nothing to do with the OO features of the two languages. The comparison between these two compilation models would take some place, but here a list of some comments about the C/C++ compilation model: - .C files may be compiled in any order - .h files are not compiled - there is no way to avoid use of the preprocessor (at least for #include) - there is no way to oblige the programmer to write all the #include directives: he may take advantage of some "hidden" includes (nested at more than one level) - the really compiled file (the compilation unit) is the result of the preprocessing phase - conventions like #ifndef X_H_ #define X_H_ ... #endif in headers to prevent multi-inclusion are only conventions, they are not part of the language - you may have several different definitions for the same class in the same program, as long as they are never compiled together in the same compilation unit; example: #define private public // *** BERK! *** #include "...h" // second definition for the same class #undef private Jerome.