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 autolearn=ham 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.75.8 with SMTP id y8mr1298731wiv.4.1343314176635; Thu, 26 Jul 2012 07:49:36 -0700 (PDT) Received: by 10.216.61.65 with SMTP id v43mr2480150wec.6.1343314088466; Thu, 26 Jul 2012 07:48:08 -0700 (PDT) Path: q11ni71877290wiw.1!nntp.google.com!16no10066156wil.1!news-out.google.com!ge7ni75786472wib.0!nntp.google.com!volia.net!news2.volia.net!feed-A.news.volia.net!border1.nntp.ams2.giganews.com!border3.nntp.ams.giganews.com!border1.nntp.ams.giganews.com!nntp.giganews.com!npeer.de.kpn-eurorings.net!npeer-ng0.de.kpn-eurorings.net!newsfeed.straub-nv.de!news.swapon.de!eternal-september.org!feeder.eternal-september.org!mx04.eternal-september.org!.POSTED!not-for-mail From: Brian Drummond Newsgroups: comp.lang.ada Subject: Re: Ada "library only" compiler ? Date: Sat, 21 Jul 2012 22:53:40 +0000 (UTC) Organization: A noiseless patient Spider Message-ID: References: <2879c45e-f8e0-4434-9f82-968c585a4539@googlegroups.com> <4ec072e1-853f-4210-82aa-9aab335ab0ba@googlegroups.com> Mime-Version: 1.0 Injection-Date: Sat, 21 Jul 2012 22:53:40 +0000 (UTC) Injection-Info: mx04.eternal-september.org; posting-host="0e44dd4a3c4e0a6e83a86f947fb780ae"; logging-data="11128"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1/p3tUuwOjVtMPjy7LGhWPDl5kWJB9np/M=" User-Agent: Pan/0.135 (Tomorrow I'll Wake Up and Scald Myself with Tea; GIT 30dc37b master) Cancel-Lock: sha1:LTXJdxvUk+IGv0pqP+gqUgDLEfE= Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Date: 2012-07-21T22:53:40+00:00 List-Id: On Sat, 21 Jul 2012 10:47:26 -0700, Patrick wrote: > The Lua team does not > bless more then a tiny set of libraries(just a few thousand lines) and > there is no official way to do many things such as serializing data. > > My Lua experience has left me shell-shocked and worried about using a > lot of the Ada libraries. It took a lot of time to learn various Lua > libraries and after finding two or three crappy ones in a row, it got > frustrating. I am not saying that the same thing will be true for Ada > but it might be nice if all the Ada binding code was in a certain place. If the language developers do not (much) endorse Lua libraries, then the available libraries are likely to be poor! Ada is strongly intended to support code re-use. Its package facilities encourage design for re-use, and re-using already-proven code is one good way to reduce the defect rate in a program. So I would expect your experience with Ada libraries to be better. (Perfection is not guaranteed however. There don't seem to be many uses of the AVR-Ada libraries supporting the AVR processors yet. So I am finding missing or incorrect features in some of these, but so far they are easy to find or fix) > I like Lua still but if I am going to use it again, I am going to mix C > libraries and Lua and pretty much forego the Lua libraries. It's easy > enough to do this as Lua and it's tiny libraries are easy to keep > separate. Rather than writing a C library, it's probably easy to write an Ada library, exporting its functionality via "convention C", and then access it in Lua... I have not done this, but I have imported C into Ada, and exported Ada functionality into a (C++) program. It's reasonably easy (the C/C++ main needs to call adainit and adafinal functions) but some messing with makefiles is involved to tie them together. You would probably need a minimal C wrapper to call adainit and adafinal functions, accessible from Lua. (Or if you can start the Lua code from a C main, it may be as easy to start it from Ada instead). But no messing about inside the compiler should be needed. > If GNAT had a clearer separation of concerns between C and Ada, I could > do the same with Ada or use Ada libraries when I want to but right now a > lot seems to be bundled together and it is hard to tell what is binding > and what is not. I think the lack of separation may work FOR you in the above case... - Brian