comp.lang.ada
 help / color / mirror / Atom feed
From: "Marin David Condic" <dont.bother.mcondic.auntie.spam@[acm.org>
Subject: Re: Future with Ada
Date: Thu, 7 Mar 2002 11:42:16 -0500
Date: 2002-03-07T16:42:17+00:00	[thread overview]
Message-ID: <a68599$8na$1@nh.pace.co.uk> (raw)
In-Reply-To: a6831k$3ls$1@a1-hrz.uni-duisburg.de

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" <sb463ba@l1-hrz.uni-duisburg.de> 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 :-)
>






  reply	other threads:[~2002-03-07 16:42 UTC|newest]

Thread overview: 264+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2001-11-09 17:59 Future with Ada Michal Nowak
2001-11-10  0:44 ` Adrian Hoe
2001-11-10 13:28 ` Frode Tennebø
2001-11-10 23:09   ` Michal Nowak
2001-11-11 15:10     ` Preben Randhol
2001-11-11 22:31       ` Michal Nowak
2001-11-10 17:31 ` Ted Dennison
2001-11-10 23:09   ` Michal Nowak
2001-11-25  9:50   ` ben
2001-11-26 15:21     ` Marin David Condic
2001-11-26 19:48       ` Larry Kilgallen
2001-11-26 20:59         ` Marin David Condic
2001-11-26 23:33           ` Jerry Petrey
2001-11-27 14:24             ` Marin David Condic
2001-11-26 22:56         ` Ted Dennison
2001-12-01 18:43     ` Richard Riehle
2001-12-01 21:29       ` Suzie Cube
2001-12-10 16:25         ` Marin David Condic
2001-12-10 17:03           ` Larry Hazel
2001-12-10 17:19             ` Ted Dennison
2001-12-10 17:34               ` Marin David Condic
2001-12-10 18:10                 ` Larry Kilgallen
2001-12-10 18:25                   ` Marin David Condic
2001-12-02  0:19       ` IsraelRT
2001-12-02  0:46       ` Brian Rogoff
2001-12-02 19:58         ` Richard Riehle
2001-12-03 17:25           ` Wes Groleau
2001-12-10 16:39             ` Marin David Condic
2001-12-10 20:30               ` Robert C. Leif, Ph.D.
2001-12-11 15:15                 ` Marin David Condic
2001-12-11 16:56                   ` Darren New
2001-12-11 17:14                     ` Marin David Condic
2001-12-12  1:47                       ` Richard Riehle
2001-12-12  2:47                         ` Larry Kilgallen
2001-12-12  6:38                           ` Mark Biggar
2001-12-12 10:53                             ` Larry Kilgallen
2001-12-12 14:35                               ` Ted Dennison
2001-12-12 17:45                                 ` Peter Hend�n
2001-12-12 19:35                                 ` Mark Lundquist
2001-12-12 20:55                                   ` Ted Dennison
2001-12-16 13:34                           ` Georg Bauhaus
2001-12-12 14:55                         ` Marin David Condic
2001-12-12 18:02                           ` tmoran
2001-12-22 19:58                           ` Gerhard Häring
2001-12-28 21:12                             ` Containers package Eric Merritt
2001-12-29 14:11                               ` Michael Erdmann
2001-12-29 23:03                                 ` Eric Merritt
2001-12-31  2:58                                   ` Nick Roberts
2001-12-31 15:09                                     ` Eric Merritt
2001-12-31 23:19                                       ` Containers package (Tenet) Nick Roberts
2002-01-01  5:45                                     ` Containers package Ted Dennison
2002-01-01 23:30                                       ` Nick Roberts
2002-01-02  0:26                                         ` Ted Dennison
2001-12-29 22:13                               ` Marc A. Criley
2001-12-12 21:49                       ` Future with Ada Darren New
2001-12-14 20:22                         ` Mark Lundquist
2001-12-11 20:36                     ` XML and Ada was " Robert C. Leif, Ph.D.
2001-12-12  8:33                   ` rob
2001-12-12 15:03                     ` Marin David Condic
2001-12-16 13:48                       ` Georg Bauhaus
2001-12-16 16:17                         ` Georg Bauhaus
2001-12-16 16:21                           ` Georg Bauhaus
2001-12-17 15:10                         ` Marin David Condic
2001-12-17 22:32                           ` Ian S. Nelson
2001-12-17 23:11                             ` Marin David Condic
2001-12-18 15:49                             ` Robert C. Leif, Ph.D.
2001-12-18 16:41                               ` Marin David Condic
2001-12-19 16:33                                 ` Mr. Caffiene
2001-12-19 17:57                                   ` Marin David Condic
2001-12-19 21:07                                     ` Ian S. Nelson
2001-12-19 21:20                                       ` Marin David Condic
2001-12-19 18:36                                   ` Robert C. Leif, Ph.D.
2001-12-19 19:49                                     ` tmoran
2001-12-19 20:16                                       ` Eric Merritt
2001-12-19 21:11                                         ` Marin David Condic
2001-12-21 14:15                                           ` Eric Merritt
2001-12-20 19:50                                       ` Ted Dennison
2001-12-20 21:37                                         ` Hyman Rosen
2001-12-21 15:42                                           ` Ted Dennison
2001-12-19 20:37                                     ` Ian S. Nelson
2001-12-19 23:36                                   ` Michal Nowak
2001-12-19 23:36                                 ` Michal Nowak
2002-01-21 22:28                                   ` Harri J Haataja
2001-12-18 12:56                           ` Georg Bauhaus
2001-12-12 17:03                     ` Ian S. Nelson
2001-12-13 17:43                     ` Mark Lundquist
2001-12-13 20:13                       ` Marin David Condic
2001-12-14 19:49                         ` Mark Lundquist
2001-12-14 19:59                           ` Pat Rogers
2001-12-14 21:00                             ` Marin David Condic
2001-12-14 23:02                               ` Pat Rogers
2001-12-17  8:15                                 ` Mark Lundquist
2001-12-17 15:27                                   ` Pat Rogers
2001-12-17 16:29                                     ` Brian Rogoff
2001-12-17 17:05                                       ` Marin David Condic
2001-12-17 15:43                                 ` Marin David Condic
2001-12-17  8:15                               ` Mark Lundquist
2001-12-17 16:03                                 ` Marin David Condic
2001-12-17  8:15                             ` Mark Lundquist
2001-12-14 20:31                           ` James Rogers
2001-12-15  1:33                             ` Richard Riehle
2001-12-15 16:35                               ` Robert C. Leif, Ph.D.
2001-12-16 14:09                               ` Georg Bauhaus
2001-12-16 15:32                                 ` Eric Merritt
2001-12-17 16:31                               ` Marin David Condic
2001-12-15  2:44                             ` Eric Merritt
2001-12-14 20:39                           ` Marin David Condic
2001-12-18 23:01                             ` Mark Lundquist
2001-12-19 15:00                               ` Marin David Condic
2001-12-20  7:23                                 ` tmoran
2001-12-20 22:30                                 ` tmoran
2001-12-20 22:43                                   ` Marin David Condic
2001-12-19 20:50                               ` Wes Groleau
2001-12-19  0:12                             ` Portable GUI (was Re: Future with Ada) Mark Lundquist
2001-12-19  7:36                               ` Robert C. Leif, Ph.D.
2001-12-20  5:00                                 ` Steve Doiel
2001-12-20  6:19                                   ` Robert C. Leif, Ph.D.
2001-12-20 14:33                                   ` Marin David Condic
2001-12-20 20:53                                 ` Ted Dennison
2001-12-20 21:14                                   ` Marin David Condic
2001-12-21 14:53                                     ` Ted Dennison
2001-12-21 15:08                                       ` Marin David Condic
2001-12-21 16:40                                         ` Ted Dennison
2001-12-21 16:26                                   ` Robert C. Leif, Ph.D.
2001-12-19 15:07                               ` Marin David Condic
2001-12-19 15:14                               ` Marin David Condic
2001-12-19 16:53                               ` Darren New
2001-12-19 17:50                                 ` Marin David Condic
2001-12-20 19:37                                   ` Richard Riehle
2001-12-20 20:05                                     ` Ted Dennison
2001-12-20 20:07                                     ` Marin David Condic
2001-12-20 20:28                                     ` Stephen Leake
2001-12-21 17:18                                       ` Richard Riehle
2001-12-22 18:16                                     ` Michal Nowak
2001-12-02 20:26         ` Future with Ada Michal Nowak
2001-12-02 19:55       ` Michal Nowak
2001-12-03 14:53         ` Ted Dennison
2001-12-07 16:54         ` Richard Riehle
2001-12-07 17:14           ` Ted Dennison
2001-12-09 10:56           ` Thomas Mueller
2001-12-09 13:57             ` David C. Hoos, Sr.
2001-12-11 17:45           ` Michal Nowak
2001-12-03 14:52       ` Ted Dennison
2001-12-12 21:56       ` John Kern
2002-02-26  2:22       ` Michael Card
2002-02-26  4:12         ` Jim Rogers
2002-02-27  1:23           ` Adrian Hoe
2002-02-27 17:51           ` Warren W. Gay VE3WWG
2002-02-28 17:00             ` Richard Riehle
2002-02-28 21:24               ` Warren W. Gay VE3WWG
2002-02-28 17:45             ` Michal Nowak
2002-02-28 18:53               ` Hyman Rosen
2002-02-28 19:24                 ` Ed Falis
2002-03-01  0:52                   ` Adrian Hoe
2002-03-01 18:11                     ` Pascal Obry
2002-03-02  1:20                       ` Adrian Hoe
2002-02-28 21:43                 ` Wes Groleau
2002-03-01  5:18                 ` Richard Riehle
2002-03-01  5:23                   ` Dave Poirier
2002-03-01 16:45                   ` Michal Nowak
2002-03-01 11:10                 ` Georg Bauhaus
2002-03-03  8:28                   ` Hyman Rosen
2002-03-05 18:40                   ` Jacob Sparre Andersen
2002-03-01 16:48                 ` Michal Nowak
2002-03-01 17:26                 ` Jeffrey Carter
2002-03-03  8:26                   ` Hyman Rosen
2002-03-03 13:28                     ` Larry Kilgallen
2002-03-03 17:47                     ` Chad R. Meiners
2002-03-04 16:30                       ` Hyman Rosen
2002-03-04 19:28                         ` Chad R. Meiners
2002-03-05 17:03                           ` Warren W. Gay VE3WWG
2002-03-05  1:41                         ` Richard Riehle
2002-03-05 21:35                           ` Wes Groleau
2002-03-05 22:04                             ` Marin David Condic
2002-03-06  8:33                               ` Dmitry A. Kazakov
2002-03-06 11:46                               ` Frank J. Lhota
2002-03-06 15:03                                 ` Marin David Condic
2002-03-07 16:08                                   ` Georg Bauhaus
2002-03-07 16:25                                     ` Marin David Condic
2002-03-09 14:51                                   ` Gary Scott
2002-03-09 15:13                                     ` Marin David Condic
2002-03-09 15:54                                     ` named control statements (was: Future with Ada) Wes Groleau
2002-03-09 16:40                                       ` Gary Scott
2002-03-09 20:53                                       ` Jeffrey Carter
2002-03-06 16:36                               ` Future with Ada Georg Bauhaus
2002-03-06 17:27                                 ` Marin David Condic
2002-03-07 16:04                                   ` Georg Bauhaus
2002-03-07 16:42                                     ` Marin David Condic [this message]
2002-03-11 13:52                                       ` Georg Bauhaus
2002-03-11 20:02                                       ` Wes Groleau
2002-03-11 23:56                                         ` Marin David Condic
2002-03-12 16:47                                           ` code partitioning (was: Future with Ada) Wes Groleau
2002-03-12 17:56                                             ` Marin David Condic
2002-03-13 13:42                                               ` labeling (was: partitioning (was: Future)) Wes Groleau
2002-03-14 12:46                                                 ` Michal Nowak
2002-03-14 17:27                                                   ` Wes Groleau
2002-03-14 20:27                                                     ` Marin David Condic
2002-03-15  8:00                                                 ` Tarjei T. Jensen
2002-03-15 15:10                                                   ` Wes Groleau
2002-03-14 15:27                                               ` code partitioning (was: Future with Ada) John R. Strohm
2002-03-15 14:15                                                 ` Ted Dennison
2002-03-16 10:37                                                   ` Kevin Cline
2002-03-13 12:26                                           ` Future with Ada John English
2002-03-13 14:15                                             ` Marin David Condic
2002-03-14  3:34                                               ` Wes Groleau
2002-03-14 15:36                                                 ` John R. Strohm
2002-03-14 17:43                                                   ` Wes Groleau
2002-03-14 11:59                                               ` John English
2002-03-13 15:16                                           ` Kevin Cline
2002-03-13 17:55                                             ` Marin David Condic
2002-03-14 15:21                                           ` John R. Strohm
2002-03-07 20:52                                   ` Kevin Cline
2002-03-07 22:12                                     ` Chad R. Meiners
2002-03-11 18:43                                       ` Kevin Cline
2002-03-11 22:53                                         ` Chad R. Meiners
2002-03-06 17:07                               ` Wes Groleau
2002-03-05  3:45                         ` Brian Rogoff
2002-03-04  1:45                     ` Eric Merritt
2002-03-04  6:03                       ` Hyman Rosen
2002-03-04 13:44                         ` Eric Merritt
2002-03-04 16:01                           ` Hyman Rosen
2002-03-04 18:14                             ` Eric Merritt
2002-03-04 16:46                           ` Jean-Pierre Rosen
2002-03-04 17:08                             ` Hyman Rosen
2002-03-04 18:15                             ` Eric Merritt
2002-03-05 16:54                             ` Pascal Obry
2002-03-05 17:26                               ` Jean-Pierre Rosen
2002-03-04 20:06                     ` Jeffrey Carter
2002-02-27  1:30         ` Adrian Hoe
2002-02-27 20:09         ` Ken Pinard
2002-03-09 20:19         ` Richard Riehle
2001-11-11 20:13 ` Ehud Lamm
2001-11-11 22:32   ` Michal Nowak
2001-11-13 21:43     ` Maciej Sobczak
2001-11-14 16:26       ` Don
2001-11-14 19:32       ` Mark Lundquist
2001-11-14 19:46         ` David C. Hoos
2001-11-15  0:02           ` Mark Lundquist
2001-11-24 23:21           ` Florian Weimer
2001-11-14 21:22         ` Ted Dennison
2001-11-14 21:50       ` Michal Nowak
2001-11-15  7:39         ` Preben Randhol
2001-11-15 14:59           ` Marin David Condic
2001-11-15 15:44             ` Preben Randhol
2001-11-15 16:00         ` John English
  -- strict thread matches above, loose matches on Subject: below --
2002-03-06  6:05 Christoph Grein
2002-03-06  9:24 ` Pascal Obry
2002-03-06 16:43   ` Georg Bauhaus
2002-03-06 15:05 ` Marin David Condic
2002-03-07 13:51   ` Wes Groleau
2002-03-06  7:14 Christoph Grein
2002-03-06  8:43 ` Dmitry A. Kazakov
2002-03-07  7:49 Christoph Grein
2002-03-07 14:06 ` Wes Groleau
2002-03-08  7:24 Christoph Grein
2002-03-08 13:58 ` Georg Bauhaus
2002-03-08 16:08 ` Wes Groleau
2002-03-11 12:39   ` John English
2002-03-08 16:34 ` Jeffrey Carter
2002-03-08 19:41   ` Wes Groleau
2002-03-09  1:21     ` Jeffrey Carter
2002-03-11  5:37 Christoph Grein
2002-03-11 13:28 ` Georg Bauhaus
2002-03-11 12:56 Christoph Grein
replies disabled

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox