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 22:21:53 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> <7dr1a.10399$F25.4223@nwrddc02.gnilink.net> <3E4736B8.1A90C349@adaworks.com> In-Reply-To: <3E4736B8.1A90C349@adaworks.com> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit Message-ID: <0yH1a.19068$F25.2303@nwrddc02.gnilink.net> Date: Mon, 10 Feb 2003 06:21:48 GMT NNTP-Posting-Host: 162.83.250.177 X-Complaints-To: abuse@verizon.net X-Trace: nwrddc02.gnilink.net 1044858108 162.83.250.177 (Mon, 10 Feb 2003 01:21:48 EST) NNTP-Posting-Date: Mon, 10 Feb 2003 01:21:48 EST Xref: archiver1.google.com comp.lang.ada:33945 Date: 2003-02-10T06:21:48+00:00 List-Id: Richard Riehle wrote: > 1) Would you care to comment on why this is typical practice. Fewer characters to type, of course. Much less thinking involved. > 2) Can one declare a function as inline, or must one include > its full definition when it is made inline? The full definition must appear in any translation unit which calls it. Inline is applied to definitions rather than declarations, generally; there's not much point to doing otherwise. > 3) In Ada, the equivalent of a declaration can be made inline, in > the specification. I believe, if I am reading Stroustrup correctly, > and, yes, it seems to be typical practice, any declaration of an > inline function (as inline) must also be a definition. If that inline > function is declared anywhere in the source code, it must be a > full definition. You may declare a function to be inline without providing a definition for it. But any translation unit which uses the function must contain the definition. (A translation unit is what you get after the preprocessor has finished doing its work - all the #include files have been merged.) This all happens as a consequence of C and C++ never having had a module or package system that would allow the compiler to seek out a separate file which holds the definition. It's possible to bolt on that sort of thing; I believe Sun's C++ compilers have such a feature.