comp.lang.ada
 help / color / mirror / Atom feed
From: Niklas Holsti <niklas.holsti@tidorum.invalid>
Subject: Re: Ada  "library only" compiler ?
Date: Mon, 23 Jul 2012 00:25:44 +0300
Date: 2012-07-23T00:25:44+03:00	[thread overview]
Message-ID: <a739eoF23qU1@mid.individual.net> (raw)
In-Reply-To: <98bd035c-3da7-4c9b-b483-051399dc5b57@googlegroups.com>

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
       .      @       .





  parent reply	other threads:[~2012-07-26 14:39 UTC|newest]

Thread overview: 41+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-07-20 20:05 Ada "library only" compiler ? Patrick
2012-07-20 21:11 ` Niklas Holsti
2012-07-20 21:47   ` Ludovic Brenta
2012-07-20 22:25   ` Peter C. Chapin
2012-07-20 22:51     ` Ludovic Brenta
2012-07-21  0:32       ` Randy Brukardt
2012-07-21 12:39         ` Pascal Obry
2012-07-22  4:59           ` Shark8
2012-07-22  7:04             ` Pascal Obry
2012-07-22 10:17           ` Florian Weimer
2012-07-24  1:54           ` Randy Brukardt
2012-07-24 16:50             ` Pascal Obry
2012-07-24 18:01               ` Vasiliy Molostov
2012-07-24 21:30                 ` Pascal Obry
2012-07-25  6:33                   ` Vasiliy Molostov
2012-07-25 23:44                   ` sbelmont700
2012-07-25 23:34               ` Randy Brukardt
2012-07-21 11:05     ` Niklas Holsti
2012-07-20 23:30   ` Patrick
2012-07-21 16:47     ` Niklas Holsti
2012-07-21 17:47       ` Patrick
2012-07-21 19:22         ` Simon Wright
2012-07-21 19:38           ` Patrick
2012-07-21 22:53         ` Brian Drummond
2012-07-22  3:25           ` Patrick
2012-07-22 17:54             ` Brian Drummond
2012-07-22 17:59               ` Brian Drummond
2012-07-22 18:44                 ` Patrick
2012-07-22 21:03                   ` Brian Drummond
2012-07-25 19:10                   ` J-P. Rosen
     [not found]               ` <m2a9yrsbf5.fsf@nidhoggr.home>
     [not found]                 ` <jui36a$hs0$1@dont-email.me>
2012-07-23 10:10                   ` Simon Wright
2012-07-24 10:55                     ` Brian Drummond
2012-07-22 21:25             ` Niklas Holsti [this message]
2012-07-22 22:00               ` Patrick
2012-07-22 21:18         ` Niklas Holsti
     [not found]   ` <olpj085ii9fpifpligh6jerghoaieiim1d@invalid.netcom.com>
2012-07-20 23:38     ` Patrick
2012-07-21 13:12     ` Niklas Holsti
2012-07-21  0:27   ` Randy Brukardt
2012-07-21  7:36     ` Dmitry A. Kazakov
2012-07-21 13:31     ` Niklas Holsti
2012-07-23  5:02 ` Miles Bader
replies disabled

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox