comp.lang.ada
 help / color / mirror / Atom feed
From: kilgallen@eisner.decus.org (Larry Kilgallen)
Subject: Re: strongly typed langauge
Date: 1996/09/19
Date: 1996-09-19T00:00:00+00:00	[thread overview]
Message-ID: <1996Sep19.120009.1@eisner> (raw)
In-Reply-To: 51rai1$2jh@rc1.vub.ac.be


> Could Some explain to me what the term "strongly typed language" is in the
> context of ada.  Could you give some examples and tips as on how to
> avoid errors related to this particular domain.

A strongly typed language is one which requires explicit declaration
of datatypes for variables and prevents inadvertent intermixing:

    declare
        POINTER_TO_INTEGER is access INTEGER;
    begin
        POINTER_TO_INTEGER := 42;
    end;

Ada compilers will indicate an error since while 42 may be an integer,
it is not a pointer to an integer.  (Ada compilers may find other
errors in the above, I have not tested it.)

Strong typing is nothing new, Pascal compilers have been able to
discover the above error for years.  There are more subtle errors,
however, which Ada can catch but Pascal cannot.

There are other programming languages, with shorter names than
Ada, which do not catch errors of the type shown above.  They
rely on the hardware to catch the error with an operating system
fault later on, when the programmer is safely out of town.

Larry Kilgallen




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

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1996-09-19  0:00 strongly typed langauge AGBOH CHARLES
1996-09-19  0:00 ` Larry Kilgallen [this message]
1996-09-19  0:00 ` Ian Ward
1996-09-22  0:00   ` Hugh Bonney
1996-09-22  0:00   ` Hugh Bonney
1996-09-23  0:00     ` Alan Brain
1996-09-20  0:00 ` Alan Brain
1996-09-23  0:00   ` Robin Vowels
  -- strict thread matches above, loose matches on Subject: below --
1996-09-21  0:00 Spasmo
1996-09-24  0:00 Spasmo
replies disabled

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