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: "Nick Roberts" Subject: Re: Equality operator overloading in ADA 83 Date: 1997/05/02 Message-ID: <01bc54ef$2621d680$LocalHost@xhv46.dial.pipex.com>#1/1 X-Deja-AN: 238956048 References: <01bc4e9b$ac0e7fa0$72041dc2@lightning> <335F5971.6375@elca-matrix.ch> <01bc5244$315f1560$28f982c1@xhv46.dial.pipex.com> Organization: UUNet PIPEX server (post doesn't reflect views of UUNet PIPEX) Newsgroups: comp.lang.ada Date: 1997-05-02T00:00:00+00:00 List-Id: Matthew Heaney wrote in article ... > In article , dewar@merv.cs.nyu.edu (Robert Dewar) wrote: > > >< >statement - the implementation would probably have to test ...>> > > > >This is only 50% of the essence. The other half is full coverage, which can > >have no meaning for extended case statements - so I think it is a bad idea > >to try to extend case statements to non-discrete types. > > Ah, Robert brings order to chaos. I heartily agree. There are *much* more > important issues to consider than changing case statements so that they > work for non-discrete types. I agree that full coverage is an essential part of the case statement, but, with respect, I think Robert is wrong to say that therefore this idea can have 'no meaning' for extended case statements: it seems to me that there would simply have to be a requirement (in the language rules) that there was an 'others' alternative in any such extended case statement, and this would then guarantee coverage (similarly to the rules for case statements whose control expression is of a type which is a formal generic (discrete) type). On the other hand, it could perhaps be argued that one of the precepts of the case statement in Ada has always been that the choices are all static (except for 'others') so that special optimisation could be applied (e.g. a jump table) to increase speed. This would, of course, be impossible for extended case statements (except by overly clever optimisation techniques). Finally, I think I would agree with Matthew that this is probably not a very important issue concerning the design of the Ada language! (So maybe I should shut up now? :-) Nick.