comp.lang.ada
 help / color / mirror / Atom feed
From: johnherro@aol.com (John Herro)
Subject: Re: More about Ada as a programming language
Date: 1996/05/05
Date: 1996-05-05T00:00:00+00:00	[thread overview]
Message-ID: <4mi2r8$ojh@newsbf02.news.aol.com> (raw)
In-Reply-To: 318bd23f.2688720@news.saipan.com

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain, Size: 2486 bytes --]


����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!




  reply	other threads:[~1996-05-05  0:00 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1996-05-04  0:00 More about Ada as a programming language ����RM��
1996-05-05  0:00 ` John Herro [this message]
1996-05-09  0:00   ` ����RM��
1996-05-09  0:00     ` John Herro
1996-05-11  0:00     ` Todd Coniam
1996-05-07  0:00 ` Todd Coniam
  -- strict thread matches above, loose matches on Subject: below --
1996-05-09  0:00 tmoran
replies disabled

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox