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=-0.3 required=5.0 tests=BAYES_00, REPLYTO_WITHOUT_TO_CC autolearn=no 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!news4.google.com!news.glorb.com!proxad.net!proxad.net!newsfeed.arcor.de!news.arcor.de!not-for-mail From: "Dmitry A. Kazakov" Subject: Re: Type safety on wikipedia Newsgroups: comp.lang.ada User-Agent: 40tude_Dialog/2.0.14.1 MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Reply-To: mailbox@dmitry-kazakov.de Organization: cbb software GmbH References: <1138260496.230283.147640@g43g2000cwa.googlegroups.com> <1138283608.433842.76060@z14g2000cwz.googlegroups.com> <43D8E85C.6020805@mailinator.com> Date: Thu, 26 Jan 2006 20:22:00 +0100 Message-ID: <1c8ecj7bgrexl$.1n6u3stni3osy$.dlg@40tude.net> NNTP-Posting-Date: 26 Jan 2006 20:21:53 MET NNTP-Posting-Host: 56207fc0.newsread2.arcor-online.net X-Trace: DXC=f`C^g8i1FIQ5U85hF6f;DjW\KbG]kaMHQ>n?D9BSA]L]QlKOToZLVN[6LHn;2LCVN[ On Thu, 26 Jan 2006 16:18:52 +0100, Alex R. Mosteo wrote: > Well, the argument given in the discussion is like this: you allocate a > pointer, make some aliases and free one of them. This is bad, but has nothing to do with type safety. The contract of a pointer (access type) isn't violated this way. > Obviously, in a GCed language, no memory area can be reallocated as long > as any reference to it is still alive. Reference is not pointer. The contract of reference may require the above. As such memory has no contract, it is untyped. Further, there is nothing in type system that prevents typed objects from sharing memory, even when types are different. Example: T and T'Class. -- Regards, Dmitry A. Kazakov http://www.dmitry-kazakov.de