comp.lang.ada
 help / color / mirror / Atom feed
From: "John R. Strohm" <strohm@airmail.net>
Subject: Re: Future with Ada
Date: Thu, 14 Mar 2002 07:21:47 -0800
Date: 2002-03-14T07:21:47-08:00	[thread overview]
Message-ID: <C19B9F35F9F9F097.60567E9CAA317941.B11D349353B51D29@lp.airnews.net> (raw)
In-Reply-To: a6jg6p$iec$1@nh.pace.co.uk

Observation: Underlying all this is a PERFECT example of what might be
called "80-column card thinking".

The underlying assumption is that the terminal screen has 25 lines and so
you should have everything broken into 25-line chunks.

However, printer pages typically allow around 60 lines, and PCs have
supported 43 and 50 line text modes for well over 10 years now.  Printer
pages also have the advantage that you can scribble on them as needed.  Hm.
I don't remember what the old Symbolics console provided, but it was a hell
of a lot more than 25 lines.

At the same time, the principle remains the same.  Having a single
procedure, spanning hundreds of run-on lines, is usually a Bad Thing.

"Marin David Condic" <dont.bother.mcondic.auntie.spam@[acm.org> wrote in
message news:a6jg6p$iec$1@nh.pace.co.uk...
> I *think* we're on the same wavelength. I was trying to say I don't object
> to something like:
>
> case (Var) is
>     when Enum_01 =>
>         Something_01 ;
>     when Enum_02 =>
>         Something_02 ;
>     when Enum_03 =>
>         Something_03 ;
>     when Enum_04 =>
>         Something_04 ;
>     when Enum_05 =>
>         Something_05 ;
>     when Enum_06 =>
>         Something_06 ;
>     when Enum_etc =>
>         Something_etc ;
>     when others =>
>         Something_Others ;
> end case ;
>
> And I would find attempts to go through gyrations to make this shorter
just
> to fit some kind of "Don't make a case statement longer than
twentysomething
> lines" rule a bit silly. My original illustration was to show a
> stupid-code-trick needed to bust up the case statement to make it shorter.
> Can you think of a way to make a case statement like this shorter that
> doesn't look silly? (Assuming you've got 20 or so enumerals for some
> reason - op-codes maybe? Lexical elements of some language you're parsing?
> Reserved words in Ada? Not hard to imagine a fairly long list of
enumerals,
> eh?)
>
> Once that case statement gets longer than a screen, I'd find it handy to
> have a name at the end of it reminding me of what I'm ending. Of course,
one
> could always encase the case in a procedure that did nothing more than
> provide the name for the check - and I'd think that was a good thing. But
> would you try to make that procedure into three procedures if the case was
> 75 lines long just to shorten it up into 25 line segments?
>
> Maybe I've run into similar things with if statements or nesting of
> structures and didn't want to start making subprograms that had no
> identifiable function other than to encapsulate some arbitrary chunk of
code
> & avoid some arbitrary nesting or line length limit. If I can write a
> subprogram name like: "Is_Device_Ready" or
> "Check_Employee_Payroll_Deductions" then I'm more than fine about taking
> that nested if or long stream of code and hiding it in there. If I have a
> hard time writing a good name for it and start resorting to
> "Run_Some_Long_Block_Of_Code_To_Avoid_The_Nesting_Police", then I know I'm
> better off leaving it the way it was. :-) (It reminds me of stunts pulled
to
> get subroutines under some arbitrary line limit - divide the routine you
> have by the number of lines in the arbitrary limit and just find
convenient
> places to cut along those breaks. One 400 line subroutine becomes four 100
> line routines with a "main" to call each in sequence, eh? :-)
>
> 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/
>
>
> "Wes Groleau" <wesgroleau@despammed.com> wrote in message
> news:3C8D0D70.BB09F3DA@despammed.com...
> >
> > >     when others =>
> > >         Do_Another_Case_In_A_Procedure (var) ; -- I *would* object to
> this.
> >
> > I would, too.  But I would probably NOT object to
> >
> >     when others =>
> >        Default_Var_Handling (voo);
> >
> > Matter of fact, whether by nesting or by calling,
> > I would object to a case choice on a variable that
> > dispatches to a case on the same variable.
> >
> > --
> > Wes Groleau
> > http://freepages.rootsweb.com/~wgroleau
>
>





  parent reply	other threads:[~2002-03-14 15:21 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
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 [this message]
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