comp.lang.ada
 help / color / mirror / Atom feed
From: johnherro@aol.com (John Herro)
Subject: Re: What about Ada?
Date: 1996/08/08
Date: 1996-08-08T00:00:00+00:00	[thread overview]
Message-ID: <4ucn5r$q8j@newsbf02.news.aol.com> (raw)
In-Reply-To: s2070028.032@alpha.unisa.ac.za


H Marx <MARXH@ALPHA.UNISA.AC.ZA> asks several
questions about Ada:
>-What would be the reasons for me to use Ada?
     Ada is a lot less error prone than other languages!  Ada catches
errors at compile time that other languages catch only at run time, or not
at all.  Also, Ada programs tend to be easier to read than programs in
other languages, and much easier to modify a month or a year later.
     Here are just two examples out of many:  First, a common error in C
is to dereference a null pointer.  This usually causes a General
Protection Fault on a PC.  In Ada, this same error will stop the program
gracefully and, with most Ada compilers, will report the line number on
which the error occurred (unless you've written an error handler). 
Second, Ada catches out-of-bounds subscripts that C misses.
>-How portable is it?
     Ada programs tend to be much more portable than programs in other
languages.  First, if you have a "validated" Ada compiler, it means that
your compiler conforms exactly to the Ada standard, and doesn't implement
a subset or superset of standard Ada.  (To earn validation, the compiler
must pass an extensive set of tests to be certain that there's no subset
or superset.)
     Also, user defined types in Ada greatly improve portability.  Suppose
you need to count to one million.  In Ada you write
type Counter is range 0 .. 1_000_000;
An Ada compiler that implements type Integer with 32 bits will
automatically select Integer for your type Counter.  If you port your
program to an Ada compiler that implements Integer with 16 bits, the
compiler will automatically select a larger type (e.g., Long_Integer),
without your having to change a line of code!
>-Are there "Integerated Developers enviroments" available?
     Many Ada compilers come with development environments.
>-Does it use DOS Seg:Ofs memory scheme's, PMode, 32-bit flat?
     This depends on the compiler.  I often use Open Ada for DOS, which
comes with Peek and Poke that use Seg:Ofs.
>-Can you use it in Windows? For windows?
     Some Ada compilers, such as Thomsoft's ActivAda and ObjectAda, work
with Windows.  There's a list of Ada compilers available for DOS and
Windows in my Ada Tutor program, which you can download at the Web and FTP
sites below my signature.
>-Does it allow function and operator overloading?
     Yes, and as you probably already know, this improves program
readability.
>-How optimised/fast is the code it produces?
     Very early Ada compilers earned a reputation for producing
inefficient code, but today's compilers are excellent!  Most of them have
several levels of optimization that you can switch on.
>Someone remarked ... that Ada does not allow macros
     This was done for a very good reason: they're too error prone and
hurt program readability.  However, Ada has named numbers and renaming, to
achieve some of the benefits of macros safely.

     You'll like Ada!  Download the Ada Tutor program (which does NOT
require a compiler when run on a PC), and like me, you'll become an
enthusiastic convert!
- John Herro
Software Innovations Technology
http://members.aol.com/AdaTutor
ftp://members.aol.com/AdaTutor




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

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1996-08-06  0:00 What about Ada? H Marx
1996-08-06  0:00 ` Aron Felix Gurski
1996-08-07  0:00 ` bourass
1996-08-07  0:00 ` Carl Bowman
1996-08-08  0:00 ` Ted Dennison
1996-08-08  0:00 ` John Herro [this message]
1996-08-09  0:00 ` Daniel P Hudson
1996-08-09  0:00   ` Robert Dewar
1996-08-10  0:00   ` Daniel P Hudson
1996-08-10  0:00     ` Robert Dewar
1996-08-12  0:00   ` Howard W. LUDWIG
  -- strict thread matches above, loose matches on Subject: below --
1996-08-06  0:00 Simon Johnston
1996-08-08  0:00 ` David Wheeler
replies disabled

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