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-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,1592759aa83d0d45 X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2003-05-24 18:33:08 PST Path: archiver1.google.com!news1.google.com!newsfeed.stanford.edu!news-spur1.maxwell.syr.edu!news.maxwell.syr.edu!wn14feed!worldnet.att.net!204.127.198.203!attbi_feed3!attbi.com!sccrnsc01.POSTED!not-for-mail From: "Steve" Newsgroups: comp.lang.ada References: <0Pxza.699607$OV.652508@rwcrnsc54> <5ad0dd8a.0305240435.337d9373@posting.google.com> Subject: Re: Suggestion for Ada 200x - Interface inheritance X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 6.00.2800.1106 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1106 Message-ID: NNTP-Posting-Host: 12.211.13.75 X-Complaints-To: abuse@attbi.com X-Trace: sccrnsc01 1053826386 12.211.13.75 (Sun, 25 May 2003 01:33:06 GMT) NNTP-Posting-Date: Sun, 25 May 2003 01:33:06 GMT Organization: AT&T Broadband Date: Sun, 25 May 2003 01:33:06 GMT Xref: archiver1.google.com comp.lang.ada:37743 Date: 2003-05-25T01:33:06+00:00 List-Id: Thanks. I looked at AI-251. It looks like it is covered.. Here's another one: Ada currently permits giving the names of operands to functions and procedures from the caller: Example: function Add( left, right : Natural ) return Natural; May be called using: result := Add( left => 2, right => 3 ); Use of the names is optional, but if they are present they must match. What do you think of the idea of also optionally giving the mode of the parameter, which if present must match the function or procedure declaration. That is, extending the above example: result := Add( in left => 2, in right => 3 ); Why? Readability. When reading code it is sometimes unclear from the caller whether or not a procedure modifies its parameters. Adding this feature would permit specifying this explicitly. I realize I haven't chosen the best example since functions only permit "in" parameters, but you probably get the idea. It really enhances readability with certain procedure calls such as: Copy( out buf_1 => a, in buf_2 => b ); Of course bettern naming conventions would help readability in this example. I could even imagine a pragma that requiring such qualification to enforce coding conventions. Steve (The Duck) "Wojtek Narczynski" wrote in message news:5ad0dd8a.0305240435.337d9373@posting.google.com... > "Steve" wrote in message news:<0Pxza.699607$OV.652508@rwcrnsc54>... [snip] > > I find your syntax cleaner than the AI proposal: > > http://www.ada-auth.org/cgi-bin/cvsweb.cgi/AIs/AI-00251.TXT?rev=1.12 > > This AI has a funny title: "Abstract Interfaces to provide Multiple > Inheritance". Two misconceptions: 1. Interfaces cannot be concrete, 2. > Interfaces do not provide multiple inheritance. They are just a > different solution to to the problem. [snip] > > Regards, > Wojtek