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-22 20:12:39 PST Path: archiver1.google.com!postnews1.google.com!not-for-mail From: wv9557@yahoo.com (Will) Newsgroups: comp.lang.ada Subject: Re: What is faster Ada or C? Date: 22 Dec 2001 20:12:38 -0800 Organization: http://groups.google.com/ Message-ID: <4a885870.0112222012.10ab7a69@posting.google.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> <3C1E2D52.7499E107@adaworks.com> <1008889302.72075@master.nyc.kbcfp.com> NNTP-Posting-Host: 199.173.190.8 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 8bit X-Trace: posting.google.com 1009080759 6782 127.0.0.1 (23 Dec 2001 04:12:39 GMT) X-Complaints-To: groups-abuse@google.com NNTP-Posting-Date: 23 Dec 2001 04:12:39 GMT Xref: archiver1.google.com comp.lang.ada:18253 Date: 2001-12-23T04:12:39+00:00 List-Id: "Hyman Rosen" wrote in message news:<1008889302.72075@master.nyc.kbcfp.com>... > "Richard Riehle" > wrote in message news:3C1E2D52.7499E107@adaworks.com... > > With the exception of "inline" this is exactly what Ada does. Therefore, > > I would continue to call it separate compilation. > > I am tempted to quote Abraham Lincoln: "If you call a tail a leg, > it still doesn't make it a leg". > > We are talking about inline! You claimed that C++ traded off the > benefits of separate compilation against the benefits of inlined code. > I hope I have demonstrated to you that C++ and Ada behave in > exactly the same way with regard to this trade-off, except that Ada > can manage to locate the body of the procedure "by itself" (that is, > Ada programming systems know where to look for a piece of code > once its name is given) and C++ requires the programmer to have > placed the body in scope at the call site. Mr Stroustrup said having 2 inline function with the same name but defined different is illegal. However both g++ and vc++ are pretty happy with having 2 identical inline functions in different files. I 'd think its not mandatory for C++ compilers to detect this kind of conflicts. I wonder how its resolved in Ada. Search every single file to search for the inline definition and scream if two inline functions (of the same name ) are found? Or be happy with the first inline found? Try guessing by looking at comments? :)