From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,FREEMAIL_FROM autolearn=ham autolearn_force=no version=3.4.4 X-Google-Thread: 103376,80bc3e0698be468f X-Google-Attributes: gid103376,public X-Google-Language: ENGLISH,ASCII-7-bit Path: g2news1.google.com!news1.google.com!fu-berlin.de!uni-berlin.de!individual.net!not-for-mail From: "Alex R. Mosteo" Newsgroups: comp.lang.ada Subject: Re: Type safety on wikipedia Date: Fri, 27 Jan 2006 12:14:11 +0100 Message-ID: <43DA0083.9090702@mailinator.com> References: <1138260496.230283.147640@g43g2000cwa.googlegroups.com> <43D8B95E.80001@mailinator.com> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Trace: individual.net W9vW2es+w2PAz6/zji606QeChLeSK832qfXad8fq1iu9wqOMc= User-Agent: Mozilla Thunderbird 1.0.7 (X11/20051013) X-Accept-Language: en-us, en In-Reply-To: Xref: g2news1.google.com comp.lang.ada:2673 Date: 2006-01-27T12:14:11+01:00 List-Id: Bobby D. Bryant wrote: > On Thu, 26 Jan 2006, "Alex R. Mosteo" wrote: > > >>Martin Krischik wrote: >> >>>Hello >>> >>>I found this interesting article on Wikipedia which made me think a >>>bit: >>> >>>http://en.wikipedia.org/wiki/Type_safety >>> >>>Do have a look at the talk page as well. >> >>After reading that I'm not sure how Ada can be type safe if unchecked >>deallocation is a common way of implementing relatively common tasks as >>linked lists and so. The explicit example given for "type unsafety" is >>easily doable in Ada. >> >>But I acknowledge that I'm new to the topic, anyone can explain? > > > The Unchecked_Deallocation has to be instantiated for a specific type. > Is there a way of using it that isn't type safe? (Surely it isn't the > type that's "Unchecked" ?) If I've understood things correctly, the problem isn't that UD is typed, but that once you start manipulating heap pointers by hand, you're out of the game (due to dangling pointers and so). But then, I'm talking by hearsay from wikipedia sources that I don't really trust. The last post from Florian seems to point that the problem is much more fundamental (again, if IIUTC).