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=0.2 required=5.0 tests=BAYES_00,INVALID_MSGID, REPLYTO_WITHOUT_TO_CC 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: Mats Weber Subject: Re: Equality operator overloading in ADA 83 Date: 1997/05/05 Message-ID: <336DC615.285E@elca-matrix.ch>#1/1 X-Deja-AN: 239479370 References: <01bc4e9b$ac0e7fa0$72041dc2@lightning> <335F5971.6375@elca-matrix.ch> <01bc5244$315f1560$28f982c1@xhv46.dial.pipex.com> <01bc54ef$2621d680$LocalHost@xhv46.dial.pipex.com> Organization: ELCA Matrix SA Reply-To: Mats.Weber@elca-matrix.ch Newsgroups: comp.lang.ada Date: 1997-05-05T00:00:00+00:00 List-Id: Robert Dewar wrote: > But in general we follow the rule in Ada of not using the others clause > precisely because it disables an important check. A case statement that > requires an others is entirely equivalent to a set of elsif's, so why > have an alternative syntax. In case f(g(x)) is when a => ... when b => ... end case; you see immediately, without having to read the whole statement, that a decision is being made that depends only on the value of f(g(x)). Moreover, if f(g(x)) is a long expression, you only have to write it once. if ... elsif does not have these two advantages.