comp.lang.ada
 help / color / mirror / Atom feed
From: "Elias Salomão Helou Neto" <eshneto@gmail.com>
Subject: Re: Fun with C
Date: Mon, 18 Apr 2011 12:12:58 -0700 (PDT)
Date: 2011-04-18T12:12:58-07:00	[thread overview]
Message-ID: <57a1fa4b-4730-41a8-be8a-82061ef9dc22@x37g2000prb.googlegroups.com> (raw)
In-Reply-To: 4dab6906$0$6893$9b4e6d93@newsspool2.arcor-online.net

On Apr 17, 7:26 pm, Georg Bauhaus <rm.dash-bauh...@futureapps.de>
wrote:
> On 4/17/11 9:35 PM, Elias Salomão Helou Neto wrote:
>
> > Someone has written a line of code without knowing what it does. Is it
> > a language problem? Not that C is spectacular, but blaming the
> > language here is not fair. Minimally competent C programmers do know
> > about such conversions.
>
> OK, that's a claim.  Michael Barr seem to have found results
> contradicting it if the "minimum" is what you minimally
> find with professional C programmers. In his netrino.com embedded
> C quiz, he found that US takers got at D+ on average.
> That's a real world, observable minimum, then.
>
> I suggest turning to observable facts and away from
> normative ontology for a moment.  Towards justifiable
> language design.
>
> Whenever a statistical phenomenon is observed,
> many start looking for correlations and hypotheses.
> Here, we have errors related to the / operation and
> the promotion rules of C's $6.3.1.  Is there a correlation?
> Will the correlation between error rates and language
> rules  be the same if using another language?
> Is that other language intrinsically better or worse, then?
>
> If there is a correlation between the frequency of a number
> of programming errors (in this case related to +,-,*,/ etc)
> and the way the corresponding part of the programming language
> is defined (in this case operand treatment), then I suggest
> the following
>
> Hypothesis 1:
>
> A language A is better designed than another B if,
> after comparable introduction to the languages,
> programmers of an A-group make fewer mistakes than
> programmers of a B-group when implementing the same
> algorithm.
>
> If so, then competent, informed language *design* will have to
> consider expected error rates when defining the language.
> Because the definitions affect error rates.
>
> A second perspective:
>
> Definition: The complexity of / (or another language feature) is
> the number of concepts that a human mind will have to connect
> properly in order to use / (or another language feature) correctly.
>
> Assumption:  Programming is a human activity.
> Since programs express human ideas, clear means of expression reflect
> programmer intentions better than formally implicit means that
> in addition depend on statements outside the language, as is the
> case with C's fundamental types.
>
> I suggest, then,
>
> Hypothesis 2:
>
> A language A is better designed than another B if an
> understanding and using the language properly is less complex,
> that is, in order to express the same algorithm,
>
> (a) it requires thinking about fewer interconnected, possibly
> implicit concepts and
>
> (b) depends less on statements outside the language.

Ok, Ada is better than C, but if you wish we can find a metric whereby
C is better than Ada as well. I won't argue on that. Specially, your
metric seems to imply that Ada is much better for those who find it
hard to think, most people after all.

It is just that industry standard is no standard. Hired programmers
are dumb and incompetent - because those are cheap, there are lots of
them. Look above for someone who say that has been programming
professionally in C for 30 years but doesn't know type promotion
rules. If you are to design a language for those guys, good luck. I am
a researcher, I do not have to, that's why I am happy with C++.

Those who have designed C, have done so for people with brain, for
real computer scientists. It is not the way to go with professional
programmers these days, so don't blame C for its popularity. Of course
Ada is a better approach for the masses. You've made your point:
programmers, as it happens with people in general, are dumb. Let us
create a language for them.

However, here is my piece of advice: it won't work. See Ariane 5's
example. Ada may give programmers a false sense of security, leading
to even more sloppiness.

If I knew it well, I guess I would advocate Ada for parallel
programming. Even the smartest researcher gets surprised sometimes by
the perils of concurrent software and some extra safety here is really
welcome. As long as it does not come at expense of performance, of
course, since this is likely the goal in parallel software.

Surely Ada would be a good and justifiable choice for most industrial
programming projects, but this is not what C was planned for - don't
blame it. Is an airplane's fault if someone without proper knowledge
tries to fly it and kills hundreds? Is a spaceship fault if an
airplane pilot feels competent to fly it and ends up killing
thousands?

Elias.



  reply	other threads:[~2011-04-18 19:12 UTC|newest]

Thread overview: 124+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-04-16 17:02 Fun with C George P.
2011-04-16 20:04 ` Nasser M. Abbasi
2011-04-16 21:12   ` Ludovic Brenta
2011-04-16 21:42     ` jimmaureenrogers
2011-04-17  7:17     ` Georg Bauhaus
2011-04-17  8:29       ` Martin
2011-04-17 18:19       ` George P.
2011-04-17  8:40     ` Georg Bauhaus
2011-04-18  1:04     ` Peter C. Chapin
2011-04-18  2:14       ` George P.
2011-04-16 22:03   ` George P.
2011-04-17  6:26 ` KK6GM
2011-04-17  6:59   ` Georg Bauhaus
2011-04-17 16:15     ` KK6GM
2011-04-17 19:35       ` Elias Salomão Helou Neto
2011-04-17 20:18         ` KK6GM
2011-04-18 19:47           ` Elias Salomão Helou Neto
2011-04-18 22:11             ` Peter C. Chapin
2011-04-17 22:26         ` Georg Bauhaus
2011-04-18 19:12           ` Elias Salomão Helou Neto [this message]
2011-04-18 20:56             ` KK6GM
2011-04-18 21:01             ` Georg Bauhaus
2011-04-18 21:20               ` Nasser M. Abbasi
2011-04-19  2:43                 ` George P.
2011-04-19 18:05                   ` Vinzent Hoefler
2011-04-19 19:34                     ` George P.
2011-04-19 20:08                       ` Georg Bauhaus
2011-04-19  1:10               ` Elias Salomão Helou Neto
2011-04-19 14:28                 ` Georg Bauhaus
2011-04-19 17:40                   ` Jeffrey Carter
2011-04-21 14:52                   ` Elias Salomão Helou Neto
2011-04-21 18:58                     ` Georg Bauhaus
2011-04-21 19:27                       ` Hyman Rosen
2011-04-28  5:13                         ` David Thompson
2011-04-28 13:41                           ` Hyman Rosen
2011-05-05  8:39                             ` David Thompson
2011-04-25 11:06                 ` Paul Colin Gloster
2011-04-25 11:00                   ` Georg Bauhaus
2011-04-25 12:12                     ` Martin
2011-04-25 18:39                       ` Paul Colin Gloster
2011-05-08 23:41           ` wilso
2011-05-20 10:41             ` Yannick Duchêne (Hibou57)
2011-05-20 16:04               ` Yannick Duchêne (Hibou57)
2011-04-18  0:12         ` George P.
2011-04-18 19:24           ` Elias Salomão Helou Neto
2011-04-19  1:22             ` George P.
2011-04-19  2:06               ` Elias Salomão Helou Neto
2011-04-19  2:37                 ` Bill Findlay
2011-04-19  3:00                 ` George P.
2011-04-17 19:19 ` Elias Salomão Helou Neto
2011-04-17 23:26   ` Gautier write-only
2011-04-17 23:43     ` Nasser M. Abbasi
2011-04-18 19:16       ` Elias Salomão Helou Neto
2011-04-18 23:10         ` Randy Brukardt
2011-04-19  1:36           ` Elias Salomão Helou Neto
2011-04-20 23:14             ` Randy Brukardt
2011-04-21 16:19               ` Elias Salomão Helou Neto
2011-04-21 17:36                 ` Dmitry A. Kazakov
2011-04-21 17:43                   ` Hyman Rosen
2011-04-21 19:44                     ` Dmitry A. Kazakov
2011-04-22  6:16                   ` Elias Salomão Helou Neto
2011-04-22  9:21                     ` Dmitry A. Kazakov
2011-04-22 13:18                       ` Hyman Rosen
2011-04-22 15:17                         ` Dmitry A. Kazakov
2011-04-23  2:08                       ` Elias Salomão Helou Neto
2011-04-23  7:23                         ` Dmitry A. Kazakov
2011-04-23  9:42                           ` Georg Bauhaus
2011-04-23 10:23                             ` Dmitry A. Kazakov
2011-04-23 18:37                           ` Elias Salomão Helou Neto
2011-04-23 21:36                             ` Dmitry A. Kazakov
2011-04-24 11:27                               ` Peter C. Chapin
2011-04-24 13:53                                 ` Dmitry A. Kazakov
2011-04-24 19:07                                   ` Nasser M. Abbasi
2011-04-24 19:46                                     ` Dmitry A. Kazakov
2011-04-24 21:20                                       ` Nasser M. Abbasi
2011-04-24 22:33                                         ` Elias Salomão Helou Neto
2011-04-25  7:09                                         ` Dmitry A. Kazakov
2011-04-25 20:46                                           ` Maciej Sobczak
2011-04-25 21:19                                             ` George P.
2011-04-26  6:18                                             ` Dmitry A. Kazakov
2011-04-26  6:58                                               ` Nasser M. Abbasi
2011-04-26  8:39                                                 ` Dmitry A. Kazakov
2011-04-26 20:57                                               ` Maciej Sobczak
2011-04-27  8:00                                                 ` Dmitry A. Kazakov
2011-04-27  8:19                                                   ` Georg Bauhaus
2011-04-27  9:32                                                     ` Dmitry A. Kazakov
2011-04-28  7:02                                                   ` Maciej Sobczak
2011-04-28  7:41                                                     ` Dmitry A. Kazakov
2011-04-28 10:24                                                       ` Peter C. Chapin
2011-04-28 13:56                                                         ` Dmitry A. Kazakov
2011-05-03  1:19                                                           ` Nasser M. Abbasi
2011-05-03  6:05                                                             ` J-P. Rosen
2011-05-03  6:15                                                               ` Ludovic Brenta
2011-05-03  7:43                                                                 ` Dmitry A. Kazakov
2011-05-03 15:34                                                               ` Bill Findlay
2011-05-03  7:53                                                             ` Georg Bauhaus
2011-05-03  9:29                                                             ` Simon Wright
2011-04-24 22:23                                       ` Elias Salomão Helou Neto
2011-04-25  7:10                                         ` Dmitry A. Kazakov
2011-04-24 20:37                                 ` Georg Bauhaus
2011-04-23 15:23                         ` George P.
2011-04-23 17:28                           ` Nasser M. Abbasi
2011-04-23 17:52                             ` Dmitry A. Kazakov
2011-04-23 18:11                               ` Nasser M. Abbasi
2011-04-23 20:47                               ` George P.
2011-04-24 11:36                                 ` Peter C. Chapin
2011-04-25 11:43                                   ` Paul Colin Gloster
2011-04-23 16:56                         ` Nasser M. Abbasi
2011-04-23 18:45                           ` Elias Salomão Helou Neto
2011-04-22 12:15                     ` J-P. Rosen
2011-04-22 14:56                       ` Niklas Holsti
2011-04-21 23:29                 ` Randy Brukardt
2011-04-22  6:29                   ` Elias Salomão Helou Neto
2011-04-25 11:22                 ` Paul Colin Gloster
2011-04-18 19:13     ` Elias Salomão Helou Neto
2011-04-20  5:11   ` J-P. Rosen
2011-04-20 15:45     ` KK6GM
2011-04-20 19:04     ` Vinzent Hoefler
2011-04-20 21:09       ` Georg Bauhaus
2011-04-20 22:52         ` Vinzent Hoefler
2011-04-21 14:18     ` Elias Salomão Helou Neto
2011-04-21 16:22       ` Vinzent Hoefler
2011-04-21 19:25         ` John B. Matthews
2011-04-23 23:07 ` Gerd
replies disabled

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