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 X-Google-Attributes: gida07f3367d7,public,usenet X-Google-NewGroupId: yes X-Google-Language: ENGLISH,ASCII-7-bit Received: by 10.216.239.205 with SMTP id c55mr677414wer.12.1344849122818; Mon, 13 Aug 2012 02:12:02 -0700 (PDT) Path: n2ni106987918win.0!nntp.google.com!feed-C.news.volia.net!volia.net!news2.volia.net!feed-A.news.volia.net!npeer.de.kpn-eurorings.net!npeer-ng0.de.kpn-eurorings.net!news-feed.eu.lambdanet.net!news.bcc.de!newsfeeder.ewetel.de!border3.nntp.ams.giganews.com!border1.nntp.ams.giganews.com!nntp.giganews.com!news.teledata-fn.de!newsfeed.arcor.de!newsspool3.arcor-online.net!news.arcor.de.POSTED!not-for-mail Date: Mon, 06 Aug 2012 21:05:39 +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: Re: Programmer defined arrays References: <501fd4a7$0$9524$9b4e6d93@newsspool1.arcor-online.net> <87mx289bjy.fsf@adaheads.sparre-andersen.dk> In-Reply-To: <87mx289bjy.fsf@adaheads.sparre-andersen.dk> Message-ID: <50201582$0$9505$9b4e6d93@newsspool1.arcor-online.net> Organization: Arcor NNTP-Posting-Date: 06 Aug 2012 21:05:38 CEST NNTP-Posting-Host: 2481d090.newsspool1.arcor-online.net X-Trace: DXC=_MH7ooBAW_Y[7Non7UCi8Uic==]BZ:af^4Fo<]lROoRQnkgeX?EC@@P8WEnDiKGIRRPCY\c7>ejVXGjA^1]:>gjRZ@B?C[^8FKW X-Complaints-To: usenet-abuse@arcor.de Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Date: 2012-08-06T21:05:38+02:00 List-Id: On 06.08.12 19:26, Jacob Sparre Andersen wrote: > Georg Bauhaus wrote: > >> 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 > > In practice functions of _discrete_ arguments may be seen as _constant_ > arrays. You can not assign a value to a function, and arrays can only > be declared with discrete indexes. > >> In this light, why should we be given means to express how arrays >> should be translated into instructions? > > What means do we have to express how arrays should be translated into > instructions? We cannot do much more then suggesting layout, alignment and such. But some have said they want more control over the translation of "array". Apparently, though, a similar wish is not expressed for "function", or callable. Why is that? A function also is an abstraction, just like an array is. I thought that these two concepts, "array" and "function", might or might not be fundamental. If "function" is so fundamental that no one asks for more programmer control over the translation process of a function, why do some ask for more programmer control over the translation process for arrays, via array becoming a type suitable for O-O, but function not becoming an O-O type?