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,XPRIO autolearn=ham autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,1592759aa83d0d45,start X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2003-05-23 16:05:34 PST Path: archiver1.google.com!news1.google.com!newsfeed.stanford.edu!news.ems.psu.edu!news.litech.org!news-spur1.maxwell.syr.edu!news.maxwell.syr.edu!logbridge.uoregon.edu!arclight.uoregon.edu!wn13feed!wn12feed!worldnet.att.net!204.127.198.203!attbi_feed3!attbi.com!rwcrnsc54.POSTED!not-for-mail From: "Steve" Newsgroups: comp.lang.ada Subject: 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: <0Pxza.699607$OV.652508@rwcrnsc54> NNTP-Posting-Host: 12.211.13.75 X-Complaints-To: abuse@attbi.com X-Trace: rwcrnsc54 1053731132 12.211.13.75 (Fri, 23 May 2003 23:05:32 GMT) NNTP-Posting-Date: Fri, 23 May 2003 23:05:32 GMT Organization: AT&T Broadband Date: Fri, 23 May 2003 23:05:32 GMT Xref: archiver1.google.com comp.lang.ada:37723 Date: 2003-05-23T23:05:32+00:00 List-Id: Java and C# use the concept of interface inheritance. What do you think of adding this feature to Ada? A tagged type containing only abstract methods (functions and procedures) would be considered to be an interface. Any tagged type may be dervied from at most one tagged type containing data elements and any number of interfaces. That is, you may define an interface: type interface_example is abstract tagged null record; function in_order( obj : interface_example ) return boolean; procedure swap( obj1, obj2 : in out interface_example ); type data_value is tagged record field1 : Natural; field2 : Natural; end record; type sorted_data is new data_value, interface_example with record is_valid : Boolean; end record; The objective is to add interfaces to existing objects such that they may be used by common routines, in the same way as Java. In fact this might make it easier to interface with Java. Steve (The Duck)