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.3 required=5.0 tests=BAYES_00,INVALID_MSGID autolearn=no autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,47def5aa7b3182bd X-Google-Attributes: gid103376,public From: tmoran@bix.com (Tom Moran) Subject: Re: How to write TYPECASE in Ada 95? Date: 1999/02/19 Message-ID: <36ccb0b1.24119115@news.pacbell.net>#1/1 X-Deja-AN: 445896213 References: <79fct8$9k3$1@murdoch.acc.Virginia.EDU> <1103_918264881@DZOG-CHEN> <36cb2712.1390453@news.pacbell.net> <7ai3m2$4t0$1@nnrp1.dejanews.com> X-Complaints-To: abuse@pacbell.net X-Trace: typhoon-sf.pbi.net 919384564 207.214.211.193 (Thu, 18 Feb 1999 16:36:04 PDT) Organization: SBC Internet Services NNTP-Posting-Date: Thu, 18 Feb 1999 16:36:04 PDT Newsgroups: comp.lang.ada Date: 1999-02-19T00:00:00+00:00 List-Id: >The use of >case statements may make it easier to add operations, the >use of dispatching may make it easier to add types. Which >is better depends on the particular situation. And what do you suggest for the case where an existing system has been designed with tagged records to make it easy to add types, and you find it necessary to add an operation? Must one then add a typecase, pardon me, an if-elsif series of "if x in variant_1 then..."? Or is there a better way (short of modifying the original system, of course)?