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=unavailable autolearn_force=no version=3.4.4 Path: eternal-september.org!reader01.eternal-september.org!reader02.eternal-september.org!news.eternal-september.org!mx02.eternal-september.org!.POSTED!not-for-mail From: Simon Clubley Newsgroups: comp.lang.ada Subject: Re: C versus Ada (once again :-)), was: Re: F-22 ADA Programming Date: Mon, 3 Nov 2014 01:54:38 +0000 (UTC) Organization: A noiseless patient Spider Message-ID: References: <220f97ab-9aa2-4961-b140-2b271c3ab99a@googlegroups.com> <99759c3f-a35f-4745-a8fd-2fb6ab6fb1aa@googlegroups.com> <48dc1630-8e7d-4e29-8bdd-53d74932d9d0@googlegroups.com> <88a7f98c-55c2-4b5f-8a9d-c8b7512781c8@googlegroups.com> <50cacb19-5d0b-4dbe-b91b-0b3b462913d6@googlegroups.com> <07d0ad94-160b-4873-ba1b-403e8c0bc420@googlegroups.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Injection-Date: Mon, 3 Nov 2014 01:54:38 +0000 (UTC) Injection-Info: mx02.eternal-september.org; posting-host="4ba3e936a920522f57a8dcc8c800be9e"; logging-data="28979"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX19NuIRgfxVGIzXfP5mBVfzm1oRqDAGwbOc=" User-Agent: slrn/0.9.9p1 (Linux) Cancel-Lock: sha1:Mh2dcQuBISO6cchl2NOhHzX480Y= Xref: news.eternal-september.org comp.lang.ada:22984 Date: 2014-11-03T01:54:38+00:00 List-Id: On 2014-11-01, Georg Bauhaus wrote: > On 01.11.14 04:03, Simon Clubley wrote: > >> We keep C because the C compilers generate code to run on everything >> out there - and there are always options for each target which don't >> restrict what you can do with the generated code unlike GNAT GPL. > > Then why not use FSF GNAT? Because it is not as convenient as > a fully supported compiler? > I _only_ use FSF GNAT and not ACT's GPL version. :-) The point you are missing is that just because there is C language support within the FSF kit, it doesn't mean there is viable Ada support. Two good examples are ARM and PIC32. Luke's done some good work in this area, but the last time I checked (a year or two ago) he was having problems with things breaking between gcc versions and getting gcc to build for these targets seemed way more fragile than it should be. There are also the specialist microcontrollers which don't have Ada compilers but do have C compilers. A popular example would be the 8-bit PICs or (less mainstream) the smaller microcontrollers from Freescale. > There is more, though. I am abbreviating by using "freeware" notions > such as no-cost, or <100 price range, no run-time cost, > and no tit-for-tat license. I could have used "gift". > > Then, first, many C compilers are not freeware in commercial or closed > source projects. Second, there are fewer freeware run-times for Ada > than there are freeware run-times for C. But, of both there are few. > There is no freeware Ada for iOS right now. There is no workable > freeware Ada for Android right now. This should cover the mass market of > computers for entertainment, communication, and contacts, excluding gaming. > I thought someone had brought up an Ada cross compiler for Android by using a FreeBSD host ? Are you saying it doesn't work ? (I'm currently getting into the world of Android development and once I understand it enough using the supported languages, I was going to have a look at Ada on Android). BTW, I was amused to see someone has got Fortran code running on an Android target. :-) > Then, embedded. ARM, AVR, ... does a car count as a development target > of the kind you mention, where there are, allegedly, freeware C > implementations that don't restrict in any way? Side note: AVR chips > are usually programmed using GCC. > Even in a specialist environment such as the one you mention, you should usually have a C compiler available which means for the non-critical stuff you can always import existing C language libraries from other environments. Will you always have an Ada compiler available in this case to import existing Ada libraries ? Writing libraries in C gives you portability and general flexibility options you don't currently have with Ada. I wish that wasn't the case, but that's the reality. Simon. -- Simon Clubley, clubley@remove_me.eisner.decus.org-Earth.UFP Microsoft: Bringing you 1980s technology to a 21st century world