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=-1.9 required=5.0 tests=BAYES_00 autolearn=ham autolearn_force=no version=3.4.4 X-Google-Thread: a07f3367d7,bf03d731a6ef511f X-Google-Attributes: gida07f3367d7,public,usenet X-Google-NewGroupId: yes X-Google-Language: ENGLISH,ASCII Path: g2news1.google.com!news3.google.com!feeder2.cambriumusenet.nl!feed.tweaknews.nl!85.158.31.10.MISMATCH!newsfeed-0.progon.net!progon.net!news-zh.switch.ch!kanaga.switch.ch!switch.ch!news.in2p3.fr!in2p3.fr!oleane.net!oleane!hunter.axlog.fr!nobody From: Jean-Pierre Rosen Newsgroups: comp.lang.ada Subject: Re: Copying rows in a two dimensional array. Date: Tue, 02 Feb 2010 09:52:31 +0100 Organization: Adalog Message-ID: References: <4b6637a1$0$4586$4d3efbfe@news.sover.net> NNTP-Posting-Host: mailhost.axlog.fr Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 8bit X-Trace: s1.news.oleane.net 1265100997 12464 195.25.228.57 (2 Feb 2010 08:56:37 GMT) X-Complaints-To: abuse@oleane.net NNTP-Posting-Date: Tue, 2 Feb 2010 08:56:37 +0000 (UTC) User-Agent: Thunderbird 2.0.0.23 (Windows/20090812) In-Reply-To: Xref: g2news1.google.com comp.lang.ada:8855 Date: 2010-02-02T09:52:31+01:00 List-Id: Jerry a �crit : > I've never understood why Ada does not allow slicing in > multidimensional arrays. What are the safety issues involved? And how > is it safe to force the programmer into ad hoc methods? > One-dimensional slices are simple and efficient. Multidimensional slices are a can of worms. I guess you are thinking about rectangular slices. But why stop there? A slice comprising the main diagonal and the diagonal above and below can be very useful for some calculations. Or a slice which is the triangular part of the upper half... AFAICT, Fortran-99 does provide this - and the syntax is so complicated that nobody uses it. And implementation is also a nightmare. When designing a programming language, you have to stop at some point. The ratio (cost of implementation) / usefulness is a good measure for this. I think the ratio was simply to high for this feature. -- --------------------------------------------------------- J-P. Rosen (rosen@adalog.fr) Visit Adalog's web site at http://www.adalog.fr