comp.lang.ada
 help / color / mirror / Atom feed
From: "Steve Doiel" <nospam_steved@pacifier.com>
Subject: Re: Ada vs Delphi?
Date: 1999/08/08
Date: 1999-08-08T00:00:00+00:00	[thread overview]
Message-ID: <37ae6b73.0@news.pacifier.com> (raw)
In-Reply-To: 37ae1fc8.653954@news.clara.net

>>Advantage of Ada
>>  Types may be derived from Ada.Finalization.Controlled in order to
>>eliminate the risk of memory leaks.  Delphi has no counterpart.  In Delphi
>>it is easy to create memory leaks.
>Isn't it just as 'easy' to "create memory leaks" in Ada?
>Delphi (Pascals) pointer types are just like Ada's access
>types so the same is possible in both languages.
>Delphi does use pointers all over the place for its
>interfacing stuff -- VCL.  The poster was just asking about
>scientific programming so this shouldn't really be a big
>problem.

Yes.  It is easy to create memory leaks in Ada.  It is also easy to derive
controlled types in Ada in such a way that they are immune to memory leaks.
If all dynamically allocated objects in your application are controlled, the
application will be immune to memory leaks.

Delphi has not couterpart to controlled types.  There is currently no way in
Delphi that you can make objects clean up after themselves to avoid memory
leaks.  (I wish there was... as I mentioned we are using Delphi for our
visual Apps)



>>  Ada is more stronly typed.  In Delphi different types may be freely
mixed
>>in an expression which may lead to suprises (bugs).
>I was not aware of this.  Delphi is based strongly on
>Pascal, which has one of the most securely enforced type
>domains I've seen.  All types convertions in Delphi occur
>through well defined type co-ercion functions -- Theres no
>'casting', which is what can lead to problems...


In Ada you can define two distinct types:

  type length is new float;
  type weight is new float;

If you attempt to assign a variable of type length to a variable of type
weight, it will result in a compile time error.

In Delphi if you define two types:

  type
    length = double;
    weight = double;

You may freely assign values of type length to values of type weight without
warning.

SteveD







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

Thread overview: 49+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1999-08-06  0:00 Ada vs Delphi? Andre Ratel
1999-08-06  0:00 ` William Starner
1999-08-06  0:00   ` William Starner
1999-08-07  0:00   ` tmoran
1999-08-07  0:00     ` Aidan Skinner
1999-08-07  0:00       ` Gautier
1999-08-06  0:00 ` Steve Doiel
1999-08-09  0:00   ` Paul Groves
1999-08-08  0:00     ` Steve Doiel [this message]
1999-08-10  0:00       ` Ray Blaak
1999-08-10  0:00         ` Steve Doiel
1999-08-14  0:00           ` Andre Ratel
1999-08-09  0:00     ` Robert Dewar
1999-08-11  0:00       ` Andre Ratel
1999-08-11  0:00         ` Ted Dennison
1999-08-14  0:00           ` Andre Ratel
1999-08-16  0:00             ` Ted Dennison
1999-08-11  0:00         ` Robert Dewar
1999-08-11  0:00           ` David Botton
1999-08-14  0:00           ` Andre Ratel
1999-08-11  0:00         ` Robert Dewar
1999-08-14  0:00           ` Andre Ratel
1999-08-17  0:00             ` Robert I. Eachus
1999-08-09  0:00     ` Aidan Skinner
1999-08-09  0:00     ` Robert Dewar
1999-08-09  0:00     ` Gautier
1999-08-11  0:00       ` Andre Ratel
1999-08-12  0:00         ` Gautier
1999-08-12  0:00         ` Gautier
1999-08-14  0:00           ` Andre Ratel
1999-08-14  0:00             ` Gautier
1999-08-16  0:00               ` Gautier
1999-08-15  0:00             ` Steve Doiel
1999-08-17  0:00             ` Robert I. Eachus
1999-08-10  0:00     ` Brian Rogoff
1999-08-11  0:00       ` Scientific calculations (was Re: Ada vs Delphi? ) Vladimir Olensky
1999-08-11  0:00         ` Robert Dewar
1999-08-11  0:00         ` Robert Dewar
1999-08-11  0:00           ` Vladimir Olensky
1999-08-13  0:00             ` Robert Dewar
1999-08-13  0:00               ` Brian Rogoff
1999-08-15  0:00               ` Vladimir Olensky
1999-08-15  0:00                 ` Vladimir Olensky
1999-08-13  0:00             ` Gautier
1999-08-11  0:00     ` Ada vs Delphi? Andre Ratel
1999-08-11  0:00       ` Ada vs Component Pascal (was: Ada vs Delphi?) Ted Dennison
1999-08-11  0:00       ` Ada vs Delphi? Robert Dewar
1999-08-14  0:00         ` Andre Ratel
1999-08-07  0:00 ` Gautier
replies disabled

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