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: 103376,703c4f68db81387d X-Google-Thread: 109fba,703c4f68db81387d X-Google-Thread: 115aec,703c4f68db81387d X-Google-Thread: f43e6,703c4f68db81387d X-Google-Attributes: gid103376,gid109fba,gid115aec,gidf43e6,public X-Google-Language: ENGLISH,ASCII-7-bit Path: g2news1.google.com!news4.google.com!news.glorb.com!newsfeed00.sul.t-online.de!t-online.de!news.task.gda.pl!not-for-mail From: jtg Newsgroups: comp.lang.ada,comp.lang.c++,comp.realtime,comp.software-eng Subject: Re: Teaching new tricks to an old dog (C++ -->Ada) Date: Mon, 14 Mar 2005 18:33:15 +0100 Organization: CI TASK http://www.task.gda.pl Message-ID: References: <4229bad9$0$1019$afc38c87@news.optusnet.com.au> NNTP-Posting-Host: pwr74.pwradio.pl Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-Trace: korweta.task.gda.pl 1110821307 8740 153.19.176.74 (14 Mar 2005 17:28:27 GMT) X-Complaints-To: abuse@news.task.gda.pl NNTP-Posting-Date: Mon, 14 Mar 2005 17:28:27 +0000 (UTC) X-Original-Organization: CI TASK http://www.task.gda.pl In-Reply-To: <4229bad9$0$1019$afc38c87@news.optusnet.com.au> X-Accept-Language: pl, en-us, en User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.7.5) Gecko/20041217 X-Organization-Notice: Organization line has been filtered Xref: g2news1.google.com comp.lang.ada:9374 comp.lang.c++:45591 comp.realtime:1457 comp.software-eng:5023 Date: 2005-03-14T18:33:15+01:00 List-Id: Turamnvia Suouriviaskimatta wrote: > I 'm following various posting in "comp.lang.ada, comp.lang.c++ , > comp.realtime, comp.software-eng" groups regarding selection of a > programming language of C, C++ or Ada for safety critical real-time > applications. The majority of expert/people recommend Ada for safety > critical real-time applications. I've many years of experience in C/C++ (and > Delphi) but no Ada knowledge. > > May I ask if it is too difficult to move from C/C++ to Ada? > What is the best way of learning Ada for a C/C++ programmer? > I had the same problem several years ago. I was learning Ada from tutorials (www.adahome.com) and online articles. They were nice and I could get the ideas quickly, but they were rather shallow and I just could not find answers to many questions. After buying one poor book (just the only I could find in local bookstores) I decided to search for a good book in online bookstores. I chose "Ada as a second language" by Norman Cohen and I am very glad with it. All the questions that bothered me (some for months) were answered in no time. AFAIR always when I needed to know something about Ada I could find it in this book (well, one exception: I could not find any information about preprocessor, but some Ada programmers claim you don't need preprocessor in Ada). As the title suggests, the book assumes that the reader is already a skilled programmer :-) In the book there are many comparisons to C, C++ and some other languages. If an Ada feature is similar to something in C or C++, the book mentions it to help pick the idea. If there are differences, the book mentions them too, to help avoid potential pitfalls or correct "bad habits", i.e. ways which are natural in one language but are not the right way to do sth in Ada. So I think the book would be as useful for you as it was for me. Is it difficult to move from C/C++ to Ada? Maybe I can tell you what you may expect (from my own experience only). When you write in Ada, it is much, much easier to get bugless program once you manage to compile it (of course if you make use of Ada features). However, trying to compile an Ada code may be sometimes very, very frustrating, when the compiler complains about sth, you look into the code and cannot find out what a strange rule you are breaking this time in this particular place. And in Ada you must write a lot more. You must declare everything, you must be explicit, you must obey the rules which sometimes seem stupid. And you must forget about these handy i++, --j, i+=a etc.