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.4 required=5.0 tests=AC_FROM_MANY_DOTS,BAYES_00 autolearn=no 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-07 19:14:13 PST Path: archiver1.google.com!news1.google.com!sn-xit-02!supernews.com!news-x2.support.nl!news2.euro.net!newspeer.clara.net!news.clara.net!psiuk-p2!psiuk-p3!uknet!psiuk-n!news.pace.co.uk!nh.pace.co.uk!not-for-mail From: "Marin David Condic" Newsgroups: comp.lang.ada Subject: Re: Future with Ada Date: Thu, 7 Mar 2002 11:42:16 -0500 Organization: Posted on a server owned by Pace Micro Technology plc Message-ID: References: <3C7B0B13.3080003@worldnet.att.net> <3C7D1C89.2000803@home.com> <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: dhcp-200-133.miami.pace.co.uk X-Trace: nh.pace.co.uk 1015519337 8938 136.170.200.133 (7 Mar 2002 16:42:17 GMT) X-Complaints-To: newsmaster@news.cam.pace.co.uk NNTP-Posting-Date: 7 Mar 2002 16:42:17 GMT X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 5.50.4522.1200 X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4522.1200 Xref: archiver1.google.com comp.lang.ada:20926 Date: 2002-03-07T16:42:17+00:00 List-Id: Oh... I probably wouldn't do it out of concern for speed. I'd do it if it seemed that constructing subprograms to squeeze something into some arbitrary line or nesting limit was going to make the code less intuitively obvious to the casual observer. 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: case (var) is when First_Enum => Do_Ten_Lines_Of_Stuff ; -- I wouldn't generally object to this... maybe 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 begin case (var) is when Second_Enum => Do_Ten_Lines_Of_Stuff ; when others => Do_Yet_Another_Case_In_A_Procedure (var) ; end case ; end Do_Another_Case_In_A_Procedure ; And so on, and so on, and so on... Just to avoid a 200 line case statement where and "end case Identifier;" might help you see what you were ending? I guess I've written enough code where I've exceeded a screen's worth of lines or had two or three levels of nesting and thought it would be useful to identify what the "end" parts came from. If that's bad code by some definition of "bad" then I guess I'll just have to live with the stigma. (Bad Programmer! No Cookie! :-) MDC -- Marin David Condic Senior Software Engineer Pace Micro Technology Americas www.pacemicro.com Enabling the digital revolution e-Mail: marin.condic@pacemicro.com Web: http://www.mcondic.com/ "Georg Bauhaus" wrote in message news:a6831k$3ls$1@a1-hrz.uni-duisburg.de... > > yes, sometimes, highest speed dfa in inner loops, say?. > my point was that this need not be reflected in "big" if, in a sense. > With inlined subprograms, tag magic, ... you can do a lot to reduce > the "textual length" of an if or case statement, without much or any > loss in performance. At the expense of increased expressiveness, > sometimes :-) >