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=-0.3 required=5.0 tests=BAYES_00, REPLYTO_WITHOUT_TO_CC autolearn=no autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,1d575f572a099528 X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2001-12-17 09:33:02 PST Path: archiver1.google.com!news1.google.com!newsfeed.stanford.edu!logbridge.uoregon.edu!feed2.news.rcn.net!rcn!news.mindspring.com!news.mindspring.net!not-for-mail From: Richard Riehle Newsgroups: comp.lang.ada Subject: Re: What is faster Ada or C? Date: Mon, 17 Dec 2001 09:37:22 -0800 Organization: AdaWorks Software Engineering Message-ID: <3C1E2D52.7499E107@adaworks.com> References: <9ujh51$k6m$1@wanadoo.fr> <3C0EF345.47BCC09@adaworks.com> <568ede3c.0112071202.56fc9f@posting.google.com> <3C13BC4A.1C1EBE8B@adaworks.com> <568ede3c.0112110814.1c31fd91@posting.google.com> Reply-To: richard@adaworks.com NNTP-Posting-Host: 9e.fc.cd.40 Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Server-Date: 17 Dec 2001 17:32:01 GMT X-Mailer: Mozilla 4.7 [en] (Win98; I) X-Accept-Language: en Xref: archiver1.google.com comp.lang.ada:18016 Date: 2001-12-17T17:32:01+00:00 List-Id: Hyman Rosen wrote: > Richard Riehle wrote in message news:<3C13BC4A.1C1EBE8B@adaworks.com>... > > Well, actually, it is separate compilation. Of course, if one chooses to use > > some new definition of separate compilation, so be it. > > If you look at 10.1.4/7, you will see that Ada allows an implementation > to force the recompilation of any compilation unit which calls an inlined > subprogram whenever the body of that subprogram changes. This is not an unreasonable permission given the meaning of term "inline." > The normal definition of separate compilation is exactly the opposite of > this - making changes to a subprogram, as long as you don't change its > interface, never requires recompiling the callers. With the exception of "inline" this is exactly what Ada does. Therefore, I would continue to call it separate compilation. > > Unless something has changed, C++ requires the full definition of the > > inlined function at the place where it is declared. > > That simply is not true. Just as I posted, the definition of an inline > function may be separate from its declaration. I mentioned earlier that Stroustrup's advice is to put the full definition at the point of declaration unless you have a very clever development environment. Every other C++ authority I can find also recommends putting the definition in the header. This is the typical design of a C++ inlined member function. When I first started using C++, it was necessary. Perhaps that has changed. Ada never required this, and does not even permit it. Under most circumstances, a change to an implementation in Ada requires only relinking not recompilation. Richard Riehle