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.3 required=5.0 tests=BAYES_00,INVALID_MSGID autolearn=no autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: fd6dd,c78177ec2e61f4ac X-Google-Attributes: gidfd6dd,public X-Google-Thread: 103376,c78177ec2e61f4ac X-Google-Attributes: gid103376,public From: gwinn@res.ray.com (Joe Gwinn) Subject: Re: ada and robots Date: 1997/06/03 Message-ID: #1/1 X-Deja-AN: 246043589 References: <338CDA96.53EA@halcyon.com> <338F5D7D.6C03@tiac.net> <338F9D05.5EB3@bix.com> <5mqpj3$bc5$1@goanna.cs.rmit.edu.au> <33930245.12A1@sprintmail.com> <5mv984$7kn@news.emi.com> Organization: Raytheon Electronic Systems Newsgroups: comp.robotics.misc,comp.lang.ada Date: 1997-06-03T00:00:00+00:00 List-Id: In article <5mv984$7kn@news.emi.com>, jejo@empireone.net (Jesse Johnson) wrote: > Ada was designed by the DOD as a systems programming language > for embedded systems in military vehicles, while C was designed as an > application programming language to be run on top of systems. This > makes Ada inherently better suited for robot programming. However, > for someone like me who has done a number of years of application > programming and is now trying robotics, it's easier to use C because I > already know it. Umm, C was written as a systems (that is, operating systems) programming language, riding right on the metal. The comparison was assembly code. C was intended to be in effect a machine-independent assembly language, so that an OS (UNIX) written in C would be portable from platform to platform. Read the Introduction section of K&R to get the short history and original intent of C. For a non-Ada comparison, read the Introduction section on page 133 of the "Pascal User Manual and Report", 2nd ed, Jensen and Wirth, Springer-Verlag 1974. Recall that Pascal was the base language upon which Ada was based. Reading these side by side is quite illuminating. So, one cannot conclude on the basis of original intent alone that Ada is more suited to robot programming, as both were intended from the start to ride the metal. In practice, C was much more successful than Ada83 at riding metal. Experience with Ada83 shows that it is very bad at direct control of hardware, especially I/O hardware, and simply does not handle shared memory correctly. Ada95 is claimed to be better, but I don't have any direct experience with it. Actually, not many people do just yet. I suspect that most people are using C (perhaps called from Ada) for direct control of I/O hardware and the like. Most "Ada systems" I have seen built recently are actually mixed-language systems, being a mix of C, C++, and Ada, with the Ada being in the minority (maybe 25%), if one counts all the purchased COTS code in the system. Typically, the operating system, middleware, and GUI stuff are all in C, and the application code is mostly in Ada (with C bindings, and no Ada runtime). Not all Ada compilers offer adequate support for such mixed-language systems, especially when it comes time to debug on target (vice host) systems. This can be a severe problem, because it's generally impossible to build a competitive offering without extensive use of COTS components, which are almost always in C/C++, and impossible to get working soon enough to matter without good debugging support. Whatever set of compilers and tools you plan to use should be demonstrated to do *exactly* what you need done, with sufficient performance, before purchase. Don't assume that anything works until proven. (A year ago, we very nearly bought an Ada that couldn't even link a mixed-language (C and Ada83) VxWorks system, let alone execute the code and debug. Insisting on a true and accurate demo saved our butts.) I would also comment that DoD's recent recinding of the Ada Mandate will likely cause the Ada compiler and tools market to shrink to perhaps as little as one tenth of its prior size, and that significant added investment in Ada compilers and tools is therefore unlikely, at least until the size of the remaining market becomes clear. A significant shrink is widely expected because the many DoD customers who chose Ada because of the mandate will now immediately vanish, and DoD's big push towards COTS is in effect a push to C/C++. The Ada market used to be at most one tenth the size of the C market, and things took forever to get to the Ada world. Now, it will be one hundredth. So, if something Ada is not in hand today, don't wait. It could be a long time coming. Joe Gwinn