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.1 required=5.0 tests=BAYES_00, PP_MIME_FAKE_ASCII_TEXT 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!feeder.eternal-september.org!gandalf.srv.welterde.de!news.jacob-sparre.dk!franka.jacob-sparre.dk!pnx.dk!.POSTED.rrsoftware.com!not-for-mail From: "Randy Brukardt" Newsgroups: comp.lang.ada Subject: Re: Community Input for the Maintenance and Revision of the Ada Programming Language Date: Wed, 6 Sep 2017 16:30:20 -0500 Organization: JSA Research & Innovation Message-ID: References: <4dc188de-802b-41ad-9cdd-b8246eb9a1c7@googlegroups.com> <47cc6474-8b75-4644-92d0-bd1f694c20e7@googlegroups.com> <7d014624-d143-4564-abfa-802534693644@googlegroups.com> Injection-Date: Wed, 6 Sep 2017 21:30:21 -0000 (UTC) Injection-Info: franka.jacob-sparre.dk; posting-host="rrsoftware.com:24.196.82.226"; logging-data="6090"; mail-complaints-to="news@jacob-sparre.dk" X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 6.00.2900.5931 X-RFC2646: Format=Flowed; Original X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.7246 Xref: news.eternal-september.org comp.lang.ada:47956 Date: 2017-09-06T16:30:20-05:00 List-Id: "Vincent DIEMUNSCH" wrote in message news:7d014624-d143-4564-abfa-802534693644@googlegroups.com... Le samedi 2 septembre 2017 19:08:48 UTC+2, Jeffrey R. Carter a écrit : ... >> What would A(+Red) mean? Indices don't have to be numeric. > >But an array index needs to be isomorphic to an Integer. It's an array ! >Not >a dictionnary, or a hash table. Why? In Ada 2012, if A is a hashed map, A(Red) is exactly a reference into hash table. (Yes, this is formally a function call, but it points out the continum of mapping that goes from a basic array object, thru a user-defined indexed object, to a function call -- all forms of mapping.) ... >> A(+I) is already defined for numeric I. This would not be backward >> compatible, >> so it's very unlikely to happen. > >Sure, it is not fully backward compatible. But by the way, only the absence >of any >evolution is 100% backward compatible, isn't it ? Not really true, there is a lot that can be done with pure extensions (think, for instance, conditional expressions in Ada 2012 -- their addition has no effect on existing Ada 95 code). There are plenty of uses of unary "+" in existing code, changing the meaning would silently break such code -- the worst kind of incompatibility. That we would do only for a critical issue (like composition of record "=", and that was very controversal, we made the incompatible change only because we couldn't find a sensible compatible change), surely not for something that would save a handful of keystrokes. (And remember that readability is an important goal in Ada, saving keystrokes is not a goal!) Randy.