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 autolearn=ham autolearn_force=no version=3.4.4 X-Google-Thread: 103376,ad06d2d7cb045687 X-Google-NewGroupId: yes X-Google-Attributes: gida07f3367d7,domainid0,public,usenet X-Google-Language: ENGLISH,ASCII-7-bit Received: by 10.68.213.68 with SMTP id nq4mr12662559pbc.2.1328580673416; Mon, 06 Feb 2012 18:11:13 -0800 (PST) MIME-Version: 1.0 Path: lh20ni268857pbb.0!nntp.google.com!news1.google.com!goblin1!goblin.stu.neva.ru!news.tornevall.net!news.jacob-sparre.dk!pnx.dk!jacob-sparre.dk!ada-dk.org!.POSTED!not-for-mail From: "Randy Brukardt" Newsgroups: comp.lang.ada Subject: Re: Silly and stupid post-condition or not ? Date: Mon, 6 Feb 2012 20:11:09 -0600 Organization: Jacob Sparre Andersen Research & Innovation Message-ID: References: <82wr86fzos.fsf@stephe-leake.org> <5af407fc-2868-44ca-84d2-c51a2a64104d@o4g2000pbc.googlegroups.com> <82k445fu9n.fsf@stephe-leake.org> NNTP-Posting-Host: static-69-95-181-76.mad.choiceone.net X-Trace: munin.nbi.dk 1328580672 8218 69.95.181.76 (7 Feb 2012 02:11:12 GMT) X-Complaints-To: news@jacob-sparre.dk NNTP-Posting-Date: Tue, 7 Feb 2012 02:11:12 +0000 (UTC) X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 6.00.2900.5931 X-RFC2646: Format=Flowed; Original X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.6157 Date: 2012-02-06T20:11:09-06:00 List-Id: "Robert A Duff" wrote in message news:wccwr81fi7a.fsf@shell01.TheWorld.com... > "Randy Brukardt" writes: > >> People forget that Ada uses "access types" rather than "pointers", > > A rose by any other name... > >>...and the >> reason for that is that access types are type-safe (in the absence of >> erroneous execution, anyway). > > That's like saying, "Drunk driving is safe so long as you don't crash." > > Type safety means "can't cause erroneous (unpredictable, undefined) > execution". Are you claiming that Ada is never type-safe? Since there are lots of ways to create erroneous execution in Ada, there is nothing in Ada that is remotely safe from it. (All real Ada programs are erroneous, after all.) In any case, my point was about *outside* erroneous execution. Access types themselves are type-safe. If you start using Unchecked_ programming or address overlays or foreign language interfaces, you're outside of the box, but you can't blame that on the access types and values. (And please keep in mind that I was specifically postulating that the program was using a custom storage pool; the idea being that it could detect/prevent dangling pointers and thus eliminate that particular problem from causing erroneousness.) Randy.