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=-2.9 required=5.0 tests=BAYES_00,MAILING_LIST_MULTI autolearn=unavailable autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,5b0235b23a9db0f2 X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2001-01-31 00:09:38 PST Path: supernews.google.com!sn-xit-02!supernews.com!news.gv.tsc.tdk.com!news.iac.net!news-out.cwix.com!newsfeed.cwix.com!newsfeeds.belnet.be!news.belnet.be!opentransit.net!jussieu.fr!enst!enst.fr!not-for-mail From: "Robert C. Leif, Ph.D." Newsgroups: comp.lang.ada Subject: Supertypes RE: Extensible Enumerated types Date: Wed, 31 Jan 2001 00:05:29 -0800 Organization: ENST, France Sender: comp.lang.ada-admin@ada.eu.org Message-ID: Reply-To: comp.lang.ada@ada.eu.org NNTP-Posting-Host: marvin.enst.fr Mime-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit X-Trace: avanie.enst.fr 980928479 53164 137.194.161.2 (31 Jan 2001 08:07:59 GMT) X-Complaints-To: usenet@enst.fr NNTP-Posting-Date: Wed, 31 Jan 2001 08:07:59 +0000 (UTC) To: Return-Path: X-Priority: 3 (Normal) X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook IMO, Build 9.0.2416 (9.0.2911.0) In-Reply-To: <3A76E923.318F7C1E@averstar.com> X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4522.1200 Importance: Normal Errors-To: comp.lang.ada-admin@ada.eu.org X-BeenThere: comp.lang.ada@ada.eu.org X-Mailman-Version: 2.0 Precedence: bulk List-Help: List-Post: List-Subscribe: , List-Id: comp.lang.ada mail<->news gateway List-Unsubscribe: , List-Archive: Errors-To: comp.lang.ada-admin@ada.eu.org X-BeenThere: comp.lang.ada@ada.eu.org Xref: supernews.google.com comp.lang.ada:4743 Date: 2001-01-31T00:05:29-08:00 From: Bob Leif To: My fellow Ada users This is suggestion includes the addition of a new keyword to Ada. I realize that some would consider this rank heresy. Since Ada has Subtypes to specify a subset of a type, it would be reasonable to create a symmetrical operation to create a superset of a type. -- from Package Prefix_Recs type Prefix_Type is (None, Mr, Ms, Miss, Mrs, Dr, Prof, Rev, Other); --From Package Prefix_Recs.Army Supertype Army_Prefix_Type is (Prefix_Type, Private, Corporal, Sergeant, Lieutenant, Captain, Major, Colonel, General); Prefix_Type'range would also be a possibility. Army_Prefix_Type would inherit all of the operations of Prefix_Type. I believe that super is lexicography a better choice than supra. I must add that supertypes are appropriate for a super language.