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,c3a7c1845ec5caf9 X-Google-Attributes: gid103376,public From: dewar@merv.cs.nyu.edu (Robert Dewar) Subject: Re: Equality operator overloading in ADA 83 Date: 1997/04/26 Message-ID: #1/1 X-Deja-AN: 237582149 References: <01bc4e9b$ac0e7fa0$72041dc2@lightning> <01bc5244$315f1560$28f982c1@xhv46.dial.pipex.com> Organization: New York University Newsgroups: comp.lang.ada Date: 1997-04-26T00:00:00+00:00 List-Id: Bob Duff said <> What makes you thnk a compiler cannot as easily do this kind of optimization for a series of comparisons against constant strings as it could for a possibly extededn version of the case statement. Personally I doubt this optimization is worth while in either case, but it is just as easy to do it in the if .. elsif .. elsif ... case if all comparison values are static expressions (which allows you to detect duplicates -- and hopefully give warnings when you detect them!)