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 Path: eternal-september.org!reader01.eternal-september.org!reader02.eternal-september.org!news.eternal-september.org!news.eternal-september.org!news.eternal-september.org!feeder.eternal-september.org!aioe.org!.POSTED!not-for-mail From: "Dmitry A. Kazakov" Newsgroups: comp.lang.ada Subject: Re: a new language, designed for safety ! Date: Fri, 13 Jun 2014 10:36:49 +0200 Organization: cbb software GmbH Message-ID: <9qbfr6yf0gnb.182y1qs9eigz4$.dlg@40tude.net> References: <1402308235.2520.153.camel@pascal.home.net> <85ioo9yukk.fsf@stephe-leake.org> <9qednXOIGNDuLQXORVn_vwA@giganews.com> <1872904482424209024.314619laguest-archeia.com@nntp.aioe.org> <810507a4-427e-42bb-a468-e5939a4470db@googlegroups.com> Reply-To: mailbox@dmitry-kazakov.de NNTP-Posting-Host: QTaafVZuunHujkJPndFR7g.user.speranza.aioe.org Mime-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 8bit X-Complaints-To: abuse@aioe.org User-Agent: 40tude_Dialog/2.0.15.1 X-Notice: Filtered by postfilter v. 0.8.2 Xref: news.eternal-september.org comp.lang.ada:20282 Date: 2014-06-13T10:36:49+02:00 List-Id: On Thu, 12 Jun 2014 22:12:55 +0000 (UTC), Simon Clubley wrote: > On 2014-06-12, björn lundin wrote: >> Den torsdagen den 12:e juni 2014 kl. 13:24:30 UTC+2 skrev Peter Chapin: >> >>> Consider Ada's arrays. They are fairly primitive and close to the >>> machine. >> >> And simple to use, read and write. A maintainer's dream. >> >>>Compare them with, say, lists in Haskell which are fully >>> dynamic by default and come endowed with a powerful list comprehension >>> sublanguage that makes generating and manipulating lists very simple. >> >> But usually costing a lot in readability. After a couple of years, >> the code is difficult to read/maintain. > > I've sometimes wondered if it would be a good thing to add associative > arrays, including dynamic ones, directly to Ada without having to use > containers. No. 1. From the language design POV, everything possible must be moved out the language into the library. If Ada were a better language, array could be a library container. If Ada were a worse language containers must have been implemented at the language level. 2. Associative arrays are made by their non-functional requirements. The implementations hugely differ if task-safety, persistence, search/index heuristics required/available. > 'Range would allow you to iterate over the array very cleanly. Range should have been a proper type. A'Range should have been a primitive array interface operation. -- Regards, Dmitry A. Kazakov http://www.dmitry-kazakov.de