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.4 required=5.0 tests=BAYES_00,FORGED_MUA_MOZILLA autolearn=no autolearn_force=no version=3.4.4 X-Google-Thread: 103376,73175d2d01a1b1dd X-Google-NewGroupId: yes X-Google-Attributes: gida07f3367d7,domainid0,public,usenet X-Google-Language: ENGLISH,ASCII Received: by 10.68.8.135 with SMTP id r7mr26874788pba.8.1317102653709; Mon, 26 Sep 2011 22:50:53 -0700 (PDT) Path: lh7ni5770pbb.0!nntp.google.com!news1.google.com!news4.google.com!feeder2.cambriumusenet.nl!feed.tweaknews.nl!195.62.100.242.MISMATCH!newsfeed.kamp.net!newsfeed.kamp.net!eternal-september.org!feeder.eternal-september.org!.POSTED!not-for-mail From: "J-P. Rosen" Newsgroups: comp.lang.ada Subject: Re: subprogram must not be deeper than access type Date: Tue, 27 Sep 2011 07:50:54 +0200 Organization: A noiseless patient Spider Message-ID: References: <818752663338654817.822041rmhost.bauhaus-maps.arcor.de@news.arcor.de> <15r7hdzgyr0fc.1djn7vwy23dfg$.dlg@40tude.net> <1uqthqxzri6j3.i18ifhbwmzdc.dlg@40tude.net> Mime-Version: 1.0 Injection-Date: Tue, 27 Sep 2011 05:50:53 +0000 (UTC) Injection-Info: mx04.eternal-september.org; posting-host="cJo7kSTQUrCFv2/D8KKtqw"; logging-data="13938"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1+IyXTVo8DJpK3u811fyZE9" User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:6.0.2) Gecko/20110902 Thunderbird/6.0.2 In-Reply-To: <1uqthqxzri6j3.i18ifhbwmzdc.dlg@40tude.net> Cancel-Lock: sha1:K0glnWTmenXa8rMepg4bMYf6XD0= Xref: news1.google.com comp.lang.ada:18147 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 8bit Date: 2011-09-27T07:50:54+02:00 List-Id: Le 26/09/2011 21:30, Dmitry A. Kazakov a �crit : > I'd like to have anonymous types in record components. It is annoying not > to be able to write: > > type Foo is record > Nested : record > end record; > List : array (...) of ...; > end record; > "Annoying to write" was never an issue in Ada, where we favor ease of reading over ease of writing. If your Nested component represents a logical entity of your problem domain, it deserves a name (i.e. a type). And what could you do with this component? Without a type name, no subprogram could operate on it. > Even C can this! There are lots of things you can do in C and not in Ada (shooting yourself in the foot comes to mind). -- --------------------------------------------------------- J-P. Rosen (rosen@adalog.fr) Adalog a d�m�nag� / Adalog has moved: 2 rue du Docteur Lombard, 92441 Issy-les-Moulineaux CEDEX Tel: +33 1 45 29 21 52, Fax: +33 1 45 29 25 00