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-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,a00006d3c4735d70 X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2004-01-10 04:18:50 PST Path: archiver1.google.com!news2.google.com!fu-berlin.de!uni-berlin.de!dialin-145-254-038-243.arcor-ip.NET!not-for-mail From: "Dmitry A. Kazakov" Newsgroups: comp.lang.ada Subject: Re: Certified C compilers for safety-critical embedded systems Date: Sat, 10 Jan 2004 13:25:20 +0100 Organization: At home Message-ID: References: <1731094.1f7Irsyk1h@linux1.krischik.com> <3ff1b8ef.614528516@News.CIS.DFN.DE> <3FF1E06D.A351CCB4@yahoo.com> <3ff20cc8.635997032@News.CIS.DFN.DE> <3ff9df16.30249104@News.CIS.DFN.DE> <1665674.ZrTUW4qaQq@linux1.krischik.com> <1073409810.463948@master.nyc.kbcfp.com> <1073421950.964139@master.nyc.kbcfp.com> <3ffd9d14.1526346@News.CIS.DFN.DE> <1073659951.261166@master.nyc.kbcfp.com> Reply-To: mailbox@dmitry-kazakov.de NNTP-Posting-Host: dialin-145-254-038-243.arcor-ip.net (145.254.38.243) Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7Bit X-Trace: news.uni-berlin.de 1073737128 10319726 145.254.38.243 ([77047]) User-Agent: KNode/0.7.2 Xref: archiver1.google.com comp.lang.ada:4302 Date: 2004-01-10T13:25:20+01:00 List-Id: Hyman Rosen wrote: > Vinzent 'Gadget' Hoefler wrote: >> What's wrong with that? Arrays are just (constant) functions. ;-) >> There's no difference between a function that actually calculates >> something and its precomputed equivalent called array or - to be more >> precise - lookup-table. > > Except that arrays are not constant. No that is the type of the result. It can be constant or not. Both arrays and functions are mappings. The syntax used for the arguments is irrelevant. So, consequently, Ada has () brackets for indexing. > What is the advantage of concealing > from the reader of the code that an array reference is occurring? Because "being an array" or whatsoever is an implementation detail. Acting as something, that is interesting for the reader. > This is > just another one of those places where dumb theory was used in the place > of practical language design. Strange, I would expect you telling us [rightfully] that in this particular case C++ is better than Ada. C++ has abstract arrays (operator[]), Ada does not. -- Regards, Dmitry A. Kazakov www.dmitry-kazakov.de