From: Martin Krischik <krischik@users.sourceforge.net>
Subject: Re: Type safety on wikipedia
Date: Thu, 26 Jan 2006 17:49:01 +0100
Date: 2006-01-26T17:49:01+01:00 [thread overview]
Message-ID: <1535741.yb0A0MsH1D@linux1.krischik.com> (raw)
In-Reply-To: 43D8E85C.6020805@mailinator.com
Alex R. Mosteo wrote:
> jimmaureenrogers@worldnet.att.net wrote:
>
>> I do not see how Unchecked_Deallocation interferes with type safety.
>> Ada access types are typed. There is no Ada equivalent to a C void*. An
>> Ada access type cannot be made to point to an object of some foreign
>> type. For instance,
>>
>> type Integer_Access is access Integer;
>>
>> An instance of Integer_Access cannot reference a task, or a real
>> number, or some record type. Garbage collection cannot improve type
>> safety in Ada or any other language. It can only automate the process
>> of deallocating dynamically allocated objects.
>
> Well, the argument given in the discussion is like this: you allocate a
> pointer, make some aliases and free one of them. Further allocations
> (presumibly unrelated) reuse the same heap area. You can now use a
> dangling pointer not correctly deallocated pointing to a valid memory
> area within the program, but holding completely unrelated data (from
> other types, probably).
>
> Obviously, in a GCed language, no memory area can be reallocated as long
> as any reference to it is still alive.
>
> There's a glaring affirmation in the article (not discussion) saying
> that Ada is type safe, with ML. So I wonder.
It's a Wiki and there is a dispute warning on top of it. I wonder if the Ada
link need to be removed! And perhaps a chapter on almost type save
languages could be added where Ada would more better placed.
But then Ada is supposed to me GC - only the vendors are to lazy to add an
collector.
As said: It made me think.
Martin
--
mailto://krischik@users.sourceforge.net
Ada programming at: http://ada.krischik.com
next prev parent reply other threads:[~2006-01-26 16:49 UTC|newest]
Thread overview: 42+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-01-26 7:28 Type safety on wikipedia Martin Krischik
2006-01-26 11:58 ` Alex R. Mosteo
2006-01-26 17:10 ` Martin Krischik
2006-01-26 20:24 ` Simon Wright
2006-01-26 20:43 ` Simon Wright
2006-01-27 6:58 ` Martin Krischik
2006-01-26 23:43 ` Bobby D. Bryant
2006-01-27 11:14 ` Alex R. Mosteo
2006-01-27 11:57 ` Martin Krischik
2006-01-27 15:30 ` Larry Kilgallen
2006-01-27 19:04 ` Martin Krischik
2006-01-27 22:06 ` Larry Kilgallen
2006-01-28 7:04 ` Martin Krischik
2006-01-29 21:48 ` Florian Weimer
2006-01-27 12:43 ` Georg Bauhaus
2006-01-26 13:49 ` Rod Chapman
2006-01-26 17:05 ` Martin Krischik
2006-01-26 18:14 ` Martin Krischik
2006-01-26 13:53 ` jimmaureenrogers
2006-01-26 15:18 ` Alex R. Mosteo
2006-01-26 16:49 ` Martin Krischik [this message]
2006-01-26 18:19 ` Alex R. Mosteo
2006-01-26 20:38 ` Simon Wright
2006-01-27 11:13 ` Alex R. Mosteo
2006-01-27 19:38 ` Simon Wright
2006-01-27 23:24 ` Randy Brukardt
2006-01-28 6:53 ` Martin Krischik
2006-01-27 18:58 ` Martin Krischik
2006-01-27 19:50 ` Simon Wright
2006-01-28 6:52 ` Martin Krischik
2006-01-26 19:22 ` Dmitry A. Kazakov
2006-01-26 19:07 ` Florian Weimer
2006-01-27 0:38 ` jimmaureenrogers
2006-01-27 18:54 ` Martin Krischik
2006-01-28 1:48 ` Jan Andres
2006-01-28 6:44 ` Martin Krischik
2006-01-31 2:13 ` Randy Brukardt
2006-02-06 5:02 ` Dave Thompson
2006-02-06 8:29 ` Larry Kilgallen
2006-01-27 11:34 ` Alex R. Mosteo
2006-01-27 12:18 ` Martin Krischik
2006-01-27 15:27 ` Florian Weimer
replies disabled
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox