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=-0.8 required=5.0 tests=BAYES_00,INVALID_DATE autolearn=no autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,b0123581076a0cf3 X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 1994-09-08 16:12:24 PST Newsgroups: comp.lang.ada Path: nntp.gmd.de!xlink.net!slsv6bt!slbh01.bln.sel.alcatel.de!rcvie!Austria.EU.net!EU.net!uunet!telesoft!kst From: kst@alsys.com (Keith Thompson @pulsar) Subject: Re: Ada ad in Embedded Systems Programming stinks Message-ID: Sender: news@alsys.com (USENET News Admin @flash) Organization: Alsys Group, San Diego, CA, USA References: <1994Sep1.084046.21595@sei.cmu.edu> <344u9q$di5@gnat.cs.nyu.edu> <347idh$15ss@watnews1.watson.ibm.com> <1994Sep4.092729.21408@lmpsbbs.comm.mot.com> Date: Thu, 8 Sep 1994 06:47:13 GMT Date: 1994-09-08T06:47:13+00:00 List-Id: In jgoodsen@trinidad.radsoft.com (John Goodsen) writes: > In article <1994Sep4.092729.21408@lmpsbbs.comm.mot.com> davidk@mcil.comm.mot.com (David Kramer) writes: > To add to Norman Cohen's list of reasons why an Ada compiler is more > effective than lint: > > It is much too easy to get around type mismatches in C - as any > unscrupulous C programmer knows - all you have to do is use a cast! [...] > This isn't much easier than doing unchecked conversions in Ada. > You identified a project management/process problem, not really a > technological advantage of one language over another... Any Ada program that uses an unchecked conversion must have an explicit context clause for the generic function Unchecked_Conversion. This makes it very easy to tell that the program is doing something low-level and potentially dangerous. Furthermore, Ada clearly distinguishes between unchecked and checked conversions. C uses the same construct (the cast) for arithmetic conversions from int to float that it uses to coerce one pointer type to another. Ada doesn't prevent you from writing ugly, low-level, non-portable code, but it makes it more difficult to do it accidentally -- and that *is* a technological advantage. -- Keith Thompson (The_Other_Keith) kst@alsys.com TeleSoft^H^H^H^H^H^H^H^H Alsys, Inc. 10251 Vista Sorrento Parkway, Suite 300, San Diego, CA, USA, 92121-2718 /user/kst/.signature: I/O error (core dumped)