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.5 required=5.0 tests=BAYES_00,FREEMAIL_FROM, INVALID_MSGID,PP_MIME_FAKE_ASCII_TEXT autolearn=no autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII X-Google-Thread: 103376,109f2b1f7fd9559c X-Google-Attributes: gid103376,public From: johnherro@aol.com (John Herro) Subject: Re: More about Ada as a programming language Date: 1996/05/05 Message-ID: <4mi2r8$ojh@newsbf02.news.aol.com>#1/1 X-Deja-AN: 153106229 sender: root@newsbf02.news.aol.com references: <318bd23f.2688720@news.saipan.com> organization: America Online, Inc. (1-800-827-6364) newsgroups: comp.lang.ada Date: 1996-05-05T00:00:00+00:00 List-Id: ����RM��@everywhere.com writes: > ... could anyone please tell me a > little more about Ada programming? I assume you saw my last message (saying that Ada catches errors at compile time that other languages catch only at run time, or not at all, and saying how enthusiastic I am about Ada). It's hard to know where to begin to tell you "a little more" about a language as large as Ada, but I'll pick a couple of points. Ada's handling of access types ("pointers" in other languages) makes it impossible to create dangling references, unless you deliberately use Unchecked_Deallocation or Unchecked_Access in your program. In contrast, I've seen many, many problems with C and C++ programs due to dangling references. In Ada, it IS possible to attempt to dereference a null pointer, that is, to try to access "the object pointed to" when there's no such object. But in Ada this error raises an exception which you can trap and handle. If you don't trap and handle it, the Ada program ends gracefully with a "Constraint_Error" message, and, with many Ada compilers, it can tell you on what line of your program the error occurred. In other languages, attempting to dereference a null pointer crashes the program and causes a General Protection Fault on a PC, an Access Violation on a VAX, etc. Ada's Named Parameter Association improves the readability of a call, because in the call you can see the names of the formal parameters ("dummy arguments") of the subprogram. In other languages, you have to turn to the subprogram to find the names of the formal parameters. Ada's packages enable you to contain the effects of certain program changes to a small portion of the entire program, improving maintainability. Trying to explain here how that works would take much too long. Ada has many, many other advantages; I cited just a few here. Permit me to post one more reference to my shareware Ada Tutor program, available for download at the WWW and FTP sites below my signature, and to mention once again the free on-line Ada tutorials at http://lglwww.epfl.ch/Ada/Tutorials/Lovelace/lovelace.html and at http://www.scism.sbu.ac.uk/law/lawhp.html. You'll like Ada, and you'll find the people at comp.lang.ada eager to help you. - John Herro Software Innovations Technology http://members.aol.com/AdaTutor ftp://members.aol.com/AdaTutor MUSIC is easier to read when written in C. SOFTWARE is easier to read when written in Ada!