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,92c39a3be0a7f17d X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2002-03-11 05:52:58 PST Path: archiver1.google.com!news1.google.com!newsfeed.stanford.edu!news-spur1.maxwell.syr.edu!news.maxwell.syr.edu!newsfeed00.sul.t-online.de!t-online.de!news-lei1.dfn.de!news-koe1.dfn.de!RRZ.Uni-Koeln.DE!uni-duisburg.de!not-for-mail From: Georg Bauhaus Newsgroups: comp.lang.ada Subject: Re: Future with Ada Date: Mon, 11 Mar 2002 13:52:57 +0000 (UTC) Organization: GMUGHDU Message-ID: References: <3C7E7CAD.7070504@mail.com> <3C7FB9D2.D9C6E055@boeing.com> <3C81DF1F.9000503@mail.com> <3C83A112.6080302@mail.com> <3C84223C.A356F466@adaworks.com> <3C853A04.34826F39@despammed.com> NNTP-Posting-Host: l1-hrz.uni-duisburg.de X-Trace: a1-hrz.uni-duisburg.de 1015854777 11575 134.91.4.34 (11 Mar 2002 13:52:57 GMT) X-Complaints-To: usenet@news.uni-duisburg.de NNTP-Posting-Date: Mon, 11 Mar 2002 13:52:57 +0000 (UTC) User-Agent: tin/1.5.8-20010221 ("Blue Water") (UNIX) (HP-UX/B.11.00 (9000/800)) Xref: archiver1.google.com comp.lang.ada:21047 Date: 2002-03-11T13:52:57+00:00 List-Id: Marin David Condic wrote: : Say you have an enumeration with 20 values : and a case statement handling it with 10 statements per enumeral. That's 200 : lines + overhead, right? Would you create something like: What I might consider is turning the enumeration into something that allows branching by other means than an explicit case statement. If that wasn't too artificial, or overdoing things. And I wouldn't turn away from a case statement if the cases depended on one input variable (and a lookahead, perhaps?). Does this seem like O.K.? Still, I find "end case/if foo" too inviting; Might prevent overuse of case/if if these are left as they are now ;-) irrelevant side note: Knuth has made heavy use of nested cases in his literate programming tools, squeezing a case into a screen or less by way of named sections, similar to what you have written. : : case (var) is : when First_Enum => ... : when others => : Do_Another_Case_In_A_Procedure (var) ; -- I *would* object to this. : end case ; : : procedure Do_Another_Case_In_A_Procedure (var : in var_type) is