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,1d575f572a099528 X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2001-12-07 12:02:12 PST Path: archiver1.google.com!news1.google.com!postnews1.google.com!not-for-mail From: hyrosen@mail.com (Hyman Rosen) Newsgroups: comp.lang.ada Subject: Re: What is faster Ada or C? Date: 7 Dec 2001 12:02:12 -0800 Organization: http://groups.google.com/ Message-ID: <568ede3c.0112071202.56fc9f@posting.google.com> References: <9ujh51$k6m$1@wanadoo.fr> <3C0EF345.47BCC09@adaworks.com> NNTP-Posting-Host: 204.253.248.237 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 8bit X-Trace: posting.google.com 1007755332 15094 127.0.0.1 (7 Dec 2001 20:02:12 GMT) X-Complaints-To: groups-abuse@google.com NNTP-Posting-Date: 7 Dec 2001 20:02:12 GMT Xref: archiver1.google.com comp.lang.ada:17608 Date: 2001-12-07T20:02:12+00:00 List-Id: Richard Riehle wrote in message news:<3C0EF345.47BCC09@adaworks.com>... > Practically, C++ inline functions are a bit of a nuisance since, in a class > definition, one must fully code the implementation when in-lining. That > is, C++ inline requires one to trade off the practical benefits of separate > compilation for the practical benefits of in-lined code. In C++ it is perfectly legal to separate the declaration of a function from its implementation, even when it's inline: struct a { int twice(int x); }; inline int a::twice(int x) { return 2 * x; } Any code which wants to call the function must arrange to see the definition, which is usually done through an #include. In Ada, the compiler can manage to find the definition on its own, because of the library system, but that's not exactly "separate compilation".