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: a07f3367d7,2fefe7705ed3d0e2,start X-Google-Attributes: gida07f3367d7,public,usenet X-Google-NewGroupId: yes X-Google-Language: ENGLISH,ASCII-7-bit Received: by 10.66.82.195 with SMTP id k3mr1811331pay.23.1344848464294; Mon, 13 Aug 2012 02:01:04 -0700 (PDT) Path: g9ni53389124pbo.0!nntp.google.com!npeer03.iad.highwinds-media.com!news.highwinds-media.com!feed-me.highwinds-media.com!news-in-01.newsfeed.easynews.com!easynews.com!easynews!novia!feeder3.cambriumusenet.nl!feeder1.cambriumusenet.nl!feed.tweaknews.nl!80.86.168.138.MISMATCH!news-feed.eu.lambdanet.net!texta.sil.at!de-l.enfer-du-nord.net!feeder1.enfer-du-nord.net!usenet-fr.net!feeder1-2.proxad.net!proxad.net!feeder2-2.proxad.net!newsfeed.arcor.de!newsspool4.arcor-online.net!news.arcor.de.POSTED!not-for-mail Date: Mon, 06 Aug 2012 16:28:59 +0200 From: Georg Bauhaus User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.7; rv:14.0) Gecko/20120713 Thunderbird/14.0 MIME-Version: 1.0 Newsgroups: comp.lang.ada Subject: Programmer defined arrays Message-ID: <501fd4a7$0$9524$9b4e6d93@newsspool1.arcor-online.net> Organization: Arcor NNTP-Posting-Date: 06 Aug 2012 16:28:55 CEST NNTP-Posting-Host: ff19d4be.newsspool1.arcor-online.net X-Trace: DXC=6`lnYIUA5QjFXUDVUnEXQmic==]BZ:afn4Fo<]lROoRankgeX?EC@@`USa^hhA5AYjnc\616M64>jLh>_cHTX3jmhkV?G<431Nf X-Complaints-To: usenet-abuse@arcor.de X-Received-Bytes: 2006 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Date: 2012-08-06T16:28:55+02:00 List-Id: IIUC, an array can be seen as a mapping (Index_Type[1], ..., Index_Type[n]) -> Component_Type where n is finite. Similarly, a function can be seen as a mapping (*) (Param_Type[1], ..., Param_Type[m]) -> Return_Type We can write a function's body (or its expression in Ada 2012). We cannot, however, express how the function's mapping is to be translated into instructions to be executed by some processor. That's the job of the compiler. Suppose translating a function into its instructions is to remain the job of the compiler. (Therefore, recursively, that of the persons writing the compiler.) In this light, why should we be given means to express how arrays should be translated into instructions? __ (*) Both mappings are variable, since array components can be assigned and since Ada functions are not pure, but that's an aside.