comp.lang.ada
 help / color / mirror / Atom feed
From: Patrick <patrick@spellingbeewinnars.org>
Subject: Re: Ada  "library only" compiler ?
Date: Fri, 20 Jul 2012 16:30:48 -0700 (PDT)
Date: 2012-07-20T16:30:48-07:00	[thread overview]
Message-ID: <4ec072e1-853f-4210-82aa-9aab335ab0ba@googlegroups.com> (raw)
In-Reply-To: <a6tvrmFdinU1@mid.individual.net>

Hi Niklas

Thanks for your detailed answer. I am sure you are right about all of this but if you don't mind chatting about it a little more, I could learn a lot.

So just to clarify, I am not advocating an Ada interpreter, it's just that Lua's developers are quite resistant to implementing more then the tiniest set of standard libraries. Lua and all the standard libraries are less then 18K lines of code and they are determined to keep it that way. Lua programmers are supposed to rely on C.

Ada is huge and I am not proposing some sort of limit like this but I do think that a strategic retreat might be in order, at least for some of us and Lua is an example of this. There are not really that many libraries and bindings relative to C. If someone had a small Ada compiler that they knew had to be supplemented with C that might offer a little more clarity of purpose and perhaps leaning on C for library support is the better way to go for some people and a toolset tailor made for this might be good. Again I don't mean to bash Ada, I do like it a lot.

So for instance it looks like Ada has a library to retrieve command line arguments. However it looks to be just thin wrapper over ARGV and ARGC. If someone wanted to use something a little higher up like getopts, they could rework ARGV/ARGC out this part of their C boilerplate code. At the moment the Ada binding is there whether or not you use it. I am assuming there will be many more examples of this.

However also as an example of my ignorance, I tried this to see if I could generate ASM from gnat:
gnatmake -S first_procedure.adb

It calls GCC right away:
gcc -c -S first_procedure.adb
gnatmake: "first_procedure.ali" WARNING: ALI or object file not found after compile
gnatmake: "first_procedure.adb" compilation erro

It looks like GNAT does not generate it's own ASM but relies on GCC for this, so the idea of reworking GNAT into an Ada to ASM converter is certainly false, they must interact with an internal representation. So at best it would be an Ada to GCC IR converter and then other then a simpler to understand compiler, i guess the proposal really doesn't offer much.



  parent reply	other threads:[~2012-07-26 16:25 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 [this message]
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
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