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,3a4656a5edc0dab4 X-Google-Attributes: gid103376,public Path: controlnews3.google.com!news1.google.com!newshub.sdsu.edu!elnk-nf2-pas!elnk-pas-nf1!newsfeed.earthlink.net!priapus.visi.com!orange.octanews.net!news-out.visi.com!petbe.visi.com!news.octanews.net!newsfeed-east.nntpserver.com!nntpserver.com!206.253.211.161!newsfeed1.sea.pnap.net!newsfeed2.sea.pnap.net!newsfeed.pnap.net!brmea-news-1.sun.com!news1nwk.sfbay.sun.com!new-usenet.uk.sun.com!not-for-mail From: Ole-Hjalmar Kristensen Newsgroups: comp.lang.ada Subject: Re: Ada used in General Aviation (GA) applications? Date: 14 May 2004 08:41:02 +0200 Organization: Sun Microsystems Message-ID: References: <409F69CB.8020604@noplace.com> <20619edc.0405120909.6ba1a793@posting.google.com> NNTP-Posting-Host: europa1.norway.sun.com Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: new-usenet.uk.sun.com 1084516863 2907 129.159.113.161 (14 May 2004 06:41:03 GMT) X-Complaints-To: usenet@new-usenet.uk.sun.com NNTP-Posting-Date: 14 May 2004 06:41:03 GMT User-Agent: Gnus/5.0808 (Gnus v5.8.8) Emacs/20.7 Xref: controlnews3.google.com comp.lang.ada:575 Date: 2004-05-14T06:41:03+00:00 List-Id: Lutz Donnerhacke writes: > * Pascal Obry wrote: > > And don't forget that this is just a wrong argument! When it comes to Ada > > you always hear "Well it takes time and money to leard a new langauge". > > Now let me ask some questions : > > > > - What was the cost of learning C++ ? > > Nothing. You can program for our customers in C while learning C++. > C++ is nothing more than C with Classes and the Template Library. > Pretty much agree here, although you will probably have some false steps in the beginning if you have not done any object-oriented programming before. > > > I've never heard these arguments for other language that Ada, does it > > really cost nothing ? > > It look other than C. You can't be productive while learning. > There are no examples on other websites how to implement the current task. > You are right, there are few examples around. However, I would say that you can be productive even while learning Ada. At the most basic level, C, Pascal, and Ada are sufficiently similar that you can design the system exactly the same way and implement it in any of these languages without difficulty. Been there, done that, for the very first prototype of the NATO ATCCIS system. So I would say it depends on what you are building. If you are building a system from scratch, you will probably finish just as fast in Ada as in C even if you do not know Ada already. If the activity is mainly calling existing libraries written in C or C++, then C or C++ will certainly be faster. > Of course Perl is more different, but Perl has CPAN. > Of course CPAN Modules are work in progress, if you are going deep, but > there are Modules for every fucking task. And all important modules are > written in C anyway ... So you can still programm in C while writing Perl. > > There is a very simple, but important fact against Ada: The whole Network > and OS interfaces are written in C. Only a small part of the interfaces can > be imported into Ada, because the major list of system specific constants > are only available as preprocessor macros. It get worse if you need > structures. > > So the main part of developing ordinary applications in Ada is writing a > seperate inferface to the system or the network. Nobody will pay for a list > of already defined constants. Of course, you can write a C wrapper in order > to get a interface, but this is silly. You will be expected to simply > include the system header files. So your language has to be C compatible as > much as possible. Interfacing with Ada is too expensive. > Too expensive if most of your code is calling OS and network primitives, yes. Actually, writing interface functions to the OS/network/database in C may be the path of least resistance if you are writing portable software. You define a set of interface functions which abstract away the details of the system around you. This set of functions is tuned to the specific needs of your system, not a set of general wrappers for OS calls. Of course this will work only if the environments are reasonably similar, but at least Windows, VMS, and the different versions of UN*X are similar enough that it works. Then, implement these functions in whatever language seems most appropriate for a given platform. This way, you can simply include the system header files as you say (if you choose to do it in C), and there is really no unnecessary work, as you need such an abstraction layer to minimize the cost of porting anyway. -- C++: The power, elegance and simplicity of a hand grenade.