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-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,60e2922351e0e780 X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2003-11-18 10:13:17 PST Path: archiver1.google.com!news2.google.com!news.maxwell.syr.edu!cyclone.bc.net!news.uunet.ca!nf3.bellglobal.com!nf1.bellglobal.com!nf2.bellglobal.com!news20.bellglobal.com.POSTED!not-for-mail From: "Warren W. Gay VE3WWG" User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.4) Gecko/20030624 Netscape/7.1 (ax) X-Accept-Language: en-us, en MIME-Version: 1.0 Newsgroups: comp.lang.ada Subject: Re: Re-Marketing Ada (was "With and use") References: <3FB0B57D.6070906@noplace.com> <3FB22125.1040807@noplace.com> <3FB3751D.5090809@noplace.com> <3FB8B9BC.5040505@noplace.com> <3FBA1118.4060105@noplace.com> In-Reply-To: Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit Message-ID: Date: Tue, 18 Nov 2003 12:58:49 -0500 NNTP-Posting-Host: 198.96.223.163 X-Complaints-To: abuse@sympatico.ca X-Trace: news20.bellglobal.com 1069178292 198.96.223.163 (Tue, 18 Nov 2003 12:58:12 EST) NNTP-Posting-Date: Tue, 18 Nov 2003 12:58:12 EST Organization: Bell Sympatico Xref: archiver1.google.com comp.lang.ada:2636 Date: 2003-11-18T12:58:49-05:00 List-Id: Chad R. Meiners wrote: > "Marin David Condic" wrote in message > news:3FBA1118.4060105@noplace.com... > >>They are >>likely to look at your arguments and respond that these same qualities >>are available to a greater or lesser degree in other languages that are >>*new* and *going somewhere*. Ada has to offer them something fresh and >>new or they won't want to tie their careers or those of their students >>to a technology that is perceived as being on the way out. > > I agree that nice new features, such as more libraries, should be added. > Btw, I never got the *new* argument. Doesn't new imply more risks? ;-) > Incidentally, the argument that Ada *is somewhere* and then listing all the > safety critical applications is a nice argument, but I agree the Ada should > be somewhere and going to other places, too. > > -CRM For General Purpose (GP) programming, Ada suffers from two main drawbacks: 1. Interfacing to the C world is an uphill battle. C++ (portably) is near impossible (usually you're forced into C wrapper interfaces to C++, to do this portably). 2. Availability of free (or near free) compilers for the platform. ( 3. Libraries is another, but I am going to leave that discussion out of this post. ) -- #1 -- Both of these are serious impediments. If I want to use Fred's Fast Fourier Transform routines (FFFT), I need to build a binding to it (thin or thick, but the extra work is there). C/C++ programming can take advantage of this FFFT library without any additional effort. C/C++ can use the include files, macros, objects, structures, classes without any complication. The Ada programmer must work around header files, must script around macro constants, rework macros, build wrapper routines. C++ objects cannot be portably used (starting with name mangling rules, for example). C structures alone are problematic due to padding and alignment rules. So in the #1 case, a developer, may just be inclined to sigh and use C/C++ instead, rather than to jump through those hoops. -- #2 -- For #2, I am grateful for GNAT, and all that it has done. If it were not for GNAT, I myself would not be using Ada for any of my work, for example. However, GNAT still is not prevalant everywhere. For example, I had to play a lot of games to get GNAT installed on my Linux/Alpha (long story). I couldn't get GNAT for FreeBSD on Alpha, so I dumped FreeBSD in the end, due to the frustration waiting for it to appear there. I am sure others can report other platforms where Ada is desired but not available for Open Sourced work. If your project needs to be portable to all GP platforms, then you'll probably not use Ada. Why? Because of the portability factor. If people really like what I write for Linux/UNIX/Windows, but others cannot compile it everywhere they want to run it, eventually, someone out there is going to rewrite it all in C/C++. When that has happened, the Ada programmer has wasted his Open Sourced effort. The #2 issue is getting better addressed with each passing year, but Ada is hardly ubiquitous yet. -- Summary -- I don't know what the #1 answer is. Maybe the Ada folks need to design a C/C++ to Ada "binder", that is able to reliably take a C/C++ include file, and generate a spec and body that can be used by other Ada programs (in thinish binding mode). THIS NEEDS TO BE A STANDARD TOOL, that can be counted on to work (no tweaking required), to be consistent, and to be available with the COMPILER toolset. I know some of these tools exist in various forms and shapes, for varying costs. But one needs to be defined by a standard (or even defacto standard), so that it can always be found with a compiler. It needs to always work on the same principles, generating Ada code in a consistent way (to be portable to other environments). I realize, this is probably an idealistic set of requirements. FOR GP PROGRAMMING, the reality is that we currently live in a C world. Making it easier for Ada to access that C world, I believe is extremely important. If Ada bindings can never keep up with what the C/C++ world is developing, then I think the only hope that Ada has is to make that world more easily accessible. If thin bindings were cheap, then there would be much less work in providing thick bindings. Then, there might be less resistance to taking an Ada approach. -- Warren W. Gay VE3WWG http://home.cogeco.ca/~ve3wwg