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.9 required=5.0 tests=BAYES_00 autolearn=ham autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,4687ad82921cf6ad X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2004-01-27 00:28:40 PST Path: archiver1.google.com!news2.google.com!fu-berlin.de!uni-berlin.de!tar-atanamir.cbb-automation.DE!not-for-mail From: Dmitry A. Kazakov Newsgroups: comp.lang.ada Subject: Re: issue with implementing a visitor design pattern Date: Tue, 27 Jan 2004 09:36:20 +0100 Message-ID: References: <100dqeul3pqiua0@corp.supernews.com> NNTP-Posting-Host: tar-atanamir.cbb-automation.de (212.79.194.116) Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Trace: news.uni-berlin.de 1075192119 25881035 212.79.194.116 ([77047]) X-Newsreader: Forte Agent 1.8/32.548 Xref: archiver1.google.com comp.lang.ada:4885 Date: 2004-01-27T09:36:20+01:00 List-Id: On 26 Jan 2004 15:18:41 -0500, Robert A Duff wrote: >Dmitry A. Kazakov writes: > >> On 24 Jan 2004 16:44:02 -0500, Robert A Duff >> wrote: >> >> >Dale Stanbrough writes: >> > >> >> Robert A Duff wrote: >> >> >Adding "case on 'Tag" to Ada would not be trivial. One would have to >> >reconcile the open-ended type extension capability of tagged types with >> >the full-coverage rules of case statements. >> >> Same as with integer types, an obligatory: >> >> when others => >> ... > >"when others" *defeats* the full-coverage rules. It should be used only >if you know it covers *all* the other cases, including the ones that >haven't been invented yet! It is a strange thing, "when others". Especially when others (:-)) is empty, like in: subtype Empty is String (0..-1); X : Empty := (others => ' '); -- Regards, Dmitry A. Kazakov www.dmitry-kazakov.de