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.4 required=5.0 tests=BAYES_00,FORGED_MUA_MOZILLA autolearn=no autolearn_force=no version=3.4.4 X-Google-Thread: a07f3367d7,d8e3cd3d8dbaa4fb X-Google-Attributes: gida07f3367d7,public,usenet X-Google-NewGroupId: yes X-Google-Language: ENGLISH,ASCII-7-bit Received: by 10.180.105.38 with SMTP id gj6mr1296230wib.0.1343313548314; Thu, 26 Jul 2012 07:39:08 -0700 (PDT) Path: q11ni75654288wiw.1!nntp.google.com!volia.net!news2.volia.net!feed-A.news.volia.net!newspeer1.nac.net!newsfeed.xs4all.nl!newsfeed6.news.xs4all.nl!xs4all!border4.nntp.ams.giganews.com!border2.nntp.ams.giganews.com!nntp.giganews.com!newsfeed.straub-nv.de!reality.xs3.de!news.jacob-sparre.dk!hugin.jacob-sparre.dk!nuzba.szn.dk!pnx.dk!fu-berlin.de!uni-berlin.de!individual.net!not-for-mail From: Niklas Holsti Newsgroups: comp.lang.ada Subject: Re: Ada "library only" compiler ? Date: Mon, 23 Jul 2012 00:25:44 +0300 Organization: Tidorum Ltd Message-ID: References: <2879c45e-f8e0-4434-9f82-968c585a4539@googlegroups.com> <4ec072e1-853f-4210-82aa-9aab335ab0ba@googlegroups.com> <98bd035c-3da7-4c9b-b483-051399dc5b57@googlegroups.com> Mime-Version: 1.0 X-Trace: individual.net jS20aSUVvvbNezYimCvY3QEkgo2jJ2rJsyH0MjlN7HqxNPYSIQ+tSCEFNmvevGInTz Cancel-Lock: sha1:7Ns1ofNCkBCAJAQ1iQGyw+/s5AM= User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.6; rv:13.0) Gecko/20120614 Thunderbird/13.0.1 In-Reply-To: <98bd035c-3da7-4c9b-b483-051399dc5b57@googlegroups.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Date: 2012-07-23T00:25:44+03:00 List-Id: On 12-07-22 06:25 , Patrick wrote: > On another note I ran sloccount on glibc and it's over 900K lines of > code. Newlib is about half that but is still mind crushingly huge. Why do you care? As a programmer, you only have to understand the API, not the library implementation. And any one of your programs is likely to use only a small part of the library, and the linker will omit the unused parts (if you use static linking). If you worry about porting the library to another target, that should not be very hard, since these libraries have been ported to lots of targets already. > C is smaller then Ada. It must be even harder to create a runtime for > it. That is curious reasoning; the run-time is needed to support language features, so why should a simpler lanhuage need a more complex run-time? As I understand it, the difficult parts of the Ada runtime are the run-time aspects of tasking, exceptions, the management of dynamically sized data, and perhaps finalization. C has none of these language features. The C runtime only has to initialize statically allocated data, set up the stack, and call main(). Well, there are some fairly complex library functions that can be considered part of the runtime, such as atexit() and setjmp()/longjmp(). But an implementation of C without those functions would probably be acceptable to many users, if the target is some small device. -- Niklas Holsti Tidorum Ltd niklas holsti tidorum fi . @ .