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,9fb8e2af320d5b3e X-Google-Attributes: gid103376,public,usenet X-Google-Language: ENGLISH,ASCII-7-bit Path: g2news1.google.com!news4.google.com!feeder3.cambrium.nl!feed.tweaknews.nl!newsfeed.kamp.net!newsfeed.kamp.net!newsfeed.freenet.de!news.teledata-fn.de!newsfeed.arcor.de!newsspool3.arcor-online.net!news.arcor.de.POSTED!not-for-mail From: "Dmitry A. Kazakov" Subject: Re: Bus error Newsgroups: comp.lang.ada User-Agent: 40tude_Dialog/2.0.15.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: <0367891DA5DA7E408D42A860FA002F44B0CC48@sma2901.cr.eurocopter.corp> Date: Fri, 29 Jun 2007 14:55:24 +0200 Message-ID: <1l4yqvxoid4n1.1u8eo4oo8ml4m$.dlg@40tude.net> NNTP-Posting-Date: 29 Jun 2007 14:52:21 CEST NNTP-Posting-Host: fcc0567a.newsspool1.arcor-online.net X-Trace: DXC=FZ1mI<`f[cC2jYf>V4L0gLic==]BZ:afN4Fo<]lROoRAFl8W>\BH3YBHiNC=jUAX4BDNcfSJ;bb[EFCTGGVUmh?DLK[5LiR>kgBB\0Bb[ieA]A X-Complaints-To: usenet-abuse@arcor.de Xref: g2news1.google.com comp.lang.ada:16342 Date: 2007-06-29T14:52:21+02:00 List-Id: On Fri, 29 Jun 2007 11:35:28 +0200, Duncan Sands wrote: >>> ... one objection against Ada 2005 design is that now it is impossible >> to > have types which objects were strictly temporal, i.e. to prevent >> creation > of variables. Consider this: >>> >>> [ type T (<>) is limited private; ] >>> >>> X : T := Factory; -- Was illegal in Ada 95 >>> >>> Foo (Factory); -- That's OK > > in Ada 95 you could do > > X : T renames Factory; Yes, you're right. It should be illegal. Semantically it is same as X : Integer renames 1; -- Illegal For fun: Y : Integer renames 1+1; -- Illegal Z : Integer renames "+"(1,1); -- Legal! function Very_Positive return Integer is begin return -1; end Very_Positive; Oops : Positive renames Very_Positive; -- This is OK! -- Regards, Dmitry A. Kazakov http://www.dmitry-kazakov.de