comp.lang.ada
 help / color / mirror / Atom feed
From: oplinger@proton.crd.ge.com (B. S. Oplinger)
Subject: Re: problems/risks due to programming language
Date: 23 Feb 90 18:55:58 GMT	[thread overview]
Message-ID: <5502@crdgw1.crd.ge.com> (raw)
In-Reply-To: 10811@june.cs.washington.edu% <8126@hubcap.clemson.edu% <10838@june.cs.washington.edu

Consider the following (slightly modified from the example by Scott MacHaffie):

example:
        switch (x) { /* x is a character, for example */
                case '0': 
                        number_of_groups ++;
                case '1': ... case '9':
                        print_digit(x);
                        break;
                case 'a': ... case 'z':
                        print_lowercase(x);
                        break;
        }


In my example, 0 is just like any other number except that it signals
the start of a new group, hence the increment on the number-of-groups
counter.  This is just the problem with the syntax of the C case
(switch) statement. It is designed so that a case may do some work and
then 'share' the work of the following case statement. I will submit
that this general attitude is found throughout C. Ada, although not a
perfect language, is almost always presented with some discussion on
software-engineering. I feel that this help promote good work habits. 

On LINT, I would never program without it (in C). There is no excuse
for today's language running on todays machines (hell, even the PC)
that LINT checking cannot be done during a compile. I believe that it
should also be an option that must be turned off, not on.

various random thoughts from:

brian
oplinger@crd.ge.com

<#include standard.disclaimer>

       reply	other threads:[~1990-02-23 18:55 UTC|newest]

Thread overview: 23+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <10811@june.cs.washington.edu% <8126@hubcap.clemson.edu% <10838@june.cs.washington.edu>
1990-02-23 18:55 ` B. S. Oplinger [this message]
1990-02-28 18:57 problems/risks due to programming language, stories requested Paul Snively
1990-03-02 19:19 ` David F. Carlson
1990-03-03  2:10   ` problems/risks due to programming language Karl Heuer
     [not found] <5432@crdgw1.crd.ge.com) <8103@hubcap.clemson.edu) <10811@june.cs.washington.edu) <806@enea.se>
1990-02-26 18:48 ` What`s in a name?
1990-02-26 22:02   ` Karl Heuer
1990-03-02 10:57   ` Erland Sommarskog
  -- strict thread matches above, loose matches on Subject: below --
1990-02-24 19:39 Erland Sommarskog
1990-02-23  6:46 Scott MacHaffie
1990-02-21 16:49 problems/risks due to programming language, stories requested Richard A Hammond
1990-02-21 20:15 ` problems/risks due to programming language William Thomas Wolfe, 2847 
1990-02-21 22:49   ` Richard A Hammond
1990-02-21 23:14   ` John F Nixon
1990-02-22  5:39   ` Scott MacHaffie
1990-02-22 20:13     ` William Thomas Wolfe, 2847 
1990-02-23 17:32       ` Richard A Hammond
1990-02-25 20:23         ` David Kassover
1990-02-22 20:48     ` Jeff Lawhorn
1990-02-23  2:00     ` Douglas Miller
1990-02-22 16:05       ` Dan L. Pierson
1990-02-22 20:28         ` David Kassover
1990-02-24 19:52         ` Erland Sommarskog
1990-02-23 17:45       ` Mike Harrison
1990-02-27  2:02         ` Douglas Miller
1990-02-22 18:28   ` Mike Percy
1990-02-23  2:09   ` Douglas Miller
replies disabled

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