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=unavailable autolearn_force=no version=3.4.4 Path: border2.nntp.dca.giganews.com!nntp.giganews.com!ottix-news.ottix.net!newsswitch.lcs.mit.edu!nntp.TheWorld.com!.POSTED!not-for-mail From: Robert A Duff Newsgroups: comp.lang.ada Subject: Re: a new language, designed for safety ! Date: Fri, 13 Jun 2014 16:57:21 -0400 Organization: The World Public Access UNIX, Brookline, MA Message-ID: 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> <9qbfr6yf0gnb.182y1qs9eigz4$.dlg@40tude.net> NNTP-Posting-Host: shell01.theworld.com Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: pcls7.std.com 1402693025 9173 192.74.137.71 (13 Jun 2014 20:57:05 GMT) X-Complaints-To: abuse@TheWorld.com NNTP-Posting-Date: Fri, 13 Jun 2014 20:57:05 +0000 (UTC) User-Agent: Gnus/5.1008 (Gnus v5.10.8) Emacs/21.3 (irix) Cancel-Lock: sha1:RxuSZZ2+orHRQTRelEsFlqJvZdo= Xref: number.nntp.dca.giganews.com comp.lang.ada:186903 Date: 2014-06-13T16:57:21-04:00 List-Id: "Dmitry A. Kazakov" writes: > 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. I agree. In Eiffel, "array" doesn't have any special built-in syntax/semantics. It's just something declared in the predefined library. In general, putting functionality in the predefined library greatly simplifies a language. But I think what Simon wants is convenient syntax for dealing with associative arrays, and that's reasonable. But in a better language, that wouldn't require associative arrays to be built in. By the way, I don't much like the term "associative array". To me, "array" implies random access (i.e. roughly constant-time component access). I'd prefer "map" or "mapping", where "array" is a kind of mapping, and "hashed map" is another kind. > Range should have been a proper type. A'Range should have been a primitive > array interface operation. Yes, that's another example of the same language design principle. There ought to be a way to write procedure Do_Something, such that Do_Something(Some_Array'Range); makes sense. Except it might as well be Do_Something(Some_Array.Range); or perhaps Do_Something(Range(Some_Array)); - Bob