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.9 required=5.0 tests=BAYES_00,FORGED_GMAIL_RCVD, FREEMAIL_FROM autolearn=no autolearn_force=no version=3.4.4 Path: border1.nntp.dca.giganews.com!nntp.giganews.com!usenet.blueworldhosting.com!feeder01.blueworldhosting.com!peer01.iad.highwinds-media.com!news.highwinds-media.com!feed-me.highwinds-media.com!post01.iad.highwinds-media.com!fx25.iad.POSTED!not-for-mail From: Shark8 User-Agent: Mozilla/5.0 (Windows NT 6.1; Win64; x64; rv:31.0) Gecko/20100101 Thunderbird/31.0a1 MIME-Version: 1.0 Newsgroups: comp.lang.ada Subject: Re: Your wish list for Ada 202X References: <7f1c01c5-3563-4b94-9831-152dbbf2ecdc@googlegroups.com> In-Reply-To: <7f1c01c5-3563-4b94-9831-152dbbf2ecdc@googlegroups.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Message-ID: X-Complaints-To: abuse@teranews.com NNTP-Posting-Date: Wed, 26 Mar 2014 05:23:37 UTC Organization: TeraNews.com Date: Tue, 25 Mar 2014 23:25:31 -0700 X-Received-Bytes: 3405 X-Received-Body-CRC: 1115548972 X-Original-Bytes: 3424 Xref: number.nntp.dca.giganews.com comp.lang.ada:185348 Date: 2014-03-25T23:25:31-07:00 List-Id: On 25-Mar-14 14:41, Stoik wrote: > I think that even a casual user of Ada should be able to influence somehow the new version of Ada. I wonder what is high on your list of wishes for Ada > 202X? > > I suspect many of the proposals could be tested in GNAT before being > introduced (or rejected) in the new version. One could add a switch to > GNAT indicating that we want to use some of the experimental features. (1) I think we should look at simplifying the standard packages. Consider also the [[wide_]wide_]string packages and the relationship to [[wide_]wide_]character -- it would be very nice (as well as aiding maintainability) to have the *_String [and character-handling] packages be generics instantiated on the proper Character type. (2) I also think that the INTERFACE construct could be more beneficial introducing properties (virtual fields; possibly with IN / IN OUT / OUT modes) and a way to delegate them... Delphi has an IMPLEMENTS keyword which allows you to have a field (or property) that implements the maned interface ( see: http://stackoverflow.com/a/6067165 ) -- IIRC you can also do "partial delegation" and resolution so that, given two INTERFACEs I1 and I2 which both have "function Count( Input : I* ) : Integer" and you could use both w/o any great gymnastics. type TObj = Class(I1, I2) private FCount : Integer; {Internal count for something.} FItems : Array of TSomeObject; {Dynamically sized array.} function Get_length : Integer implements I2.Count; public {This treats the read of count as a function-call.} property Count : Integer read FCount implements I1.Count; end; {TObj} {...} function TObj.Get_length : Integer; begin Get_Length := Length( FItems ); end; (3) Third, I think it would be good to extend the FOR loop once again; this time giving access to the cursor involved, this way the index can be retrieved in the new-style loops. -- Given Table : array (1..20, 1..20) of Positive we wish to populate it -- with Pascal's Triangle. For Element of Table loop -- We remember that to construct the triangle there are two rules: -- 1) If the row or the column is 1, then the value of the cell is 1, -- 2) Otherwise, the value is the sum of the its predecessor in the -- row and its predecessor in the column. Element:= (if Element'Index(1) = 1 or Element'Index(2) = 1 then else Table(Element'Index(1)-1,Element'Index(2) ) + Table(Element'Index(1) ,Element'Index(2)-1) ); end loop;