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.9 required=5.0 tests=BAYES_00,FREEMAIL_FROM autolearn=ham autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,3a9b49a9162025eb X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2003-02-09 03:47:16 PST Path: archiver1.google.com!news1.google.com!newsfeed.stanford.edu!logbridge.uoregon.edu!snoopy.risq.qc.ca!chi1.webusenet.com!news.webusenet.com!cyclone1.gnilink.net!spamkiller.gnilink.net!nwrddc02.gnilink.net.POSTED!53ab2750!not-for-mail From: Hyman Rosen User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.3b) Gecko/20030131 X-Accept-Language: en-us, en MIME-Version: 1.0 Newsgroups: comp.lang.ada Subject: Re: Bye-bye Ada ? (Ada95 Wholesale Changes?) References: <3E3B7BB5.A1A070@adaworks.com> <3NY_9.9226$x63.6255@nwrddc01.gnilink.net> <3E40A07A.CD174746@adaworks.com> <1044457651.769640@master.nyc.kbcfp.com> <3E42A61C.20905@cogeco.ca> <3E432DD4.7F256C85@adaworks.com> <3E43FA31.9873C5AA@adaworks.com> <3E44A869.DDB2352@adaworks.com> In-Reply-To: <3E44A869.DDB2352@adaworks.com> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit Message-ID: <7dr1a.10399$F25.4223@nwrddc02.gnilink.net> Date: Sun, 09 Feb 2003 11:47:15 GMT NNTP-Posting-Host: 162.83.250.177 X-Complaints-To: abuse@verizon.net X-Trace: nwrddc02.gnilink.net 1044791235 162.83.250.177 (Sun, 09 Feb 2003 06:47:15 EST) NNTP-Posting-Date: Sun, 09 Feb 2003 06:47:15 EST Xref: archiver1.google.com comp.lang.ada:33937 Date: 2003-02-09T11:47:15+00:00 List-Id: Richard Riehle wrote: > In C++, an inline function must be fully implemented in the class specification. > In Ada, one cannot include an implementation in a specification. The implementing > code is separately compiled in the body. This means that one need not > recompile the declarations when changing the implementation, in Ada. In > C++, any change to the implementation requires recompilation of all > the dependent and derived class declarations. This is a substantial > difference. This is simply false. C++ requires that if you call an inline function, the definition of that function must appear in the translation unit that contains the call. It is not required to appear in the class definition, nor must it appear when defining derived classes. The stated consequences are thus also false. Richard, you are confusing typical practice with actual requirements. // foo.h #ifndef FOO_H #define FOO_H struct foo { int bar(); }; #endif // FOO_H // foo.inl #ifndef FOO_INL #define FOO_INL #include "foo.h" inline int foo::bar() { return 3; } #endif // FOO_INL // der.h #ifndef DER_H #define DER_H #include "foo.h" struct der : foo { int baz(); } #endif // DER_H // der.inl #ifndef DER_INL #define DER_INL #include "der.h" inline int der::baz() { return 7; } #endif // DER_INL