comp.lang.ada
 help / color / mirror / Atom feed
From: dewar@cs.nyu.edu (Robert Dewar)
Subject: Re: Easily-Read C++?
Date: 5 Oct 1994 09:28:03 -0400
Date: 1994-10-05T09:28:03-04:00	[thread overview]
Message-ID: <36u9l3$2bb@gnat.cs.nyu.edu> (raw)
In-Reply-To: 36tsda$s32@disunms.epfl.ch

The point that C and C++ programmers tend to use abreviations and in general
short identifiers, where as Ada programmers tend to use long fully spelled
out names is a pretty important one. Because, good choice of names is often
critical to readability of code (more critical than the basic syntactic
structure of the language -- Basic with good names can be much more readable
than Ada with junk short names).

So, it isn't a language issue at all? right? you can perfectly well use nice
names in C++ (or for that matter Basic) if you want to.

Well, I am not so sure that this is not a language issue. THe trouble with
C, inherited by C++, is that it has a lot of very neat notations that 
somehow are much nicer and neater with short names (much the same could
be said of many traditional mathematical notations, mathematicians tend
to call a function f, rather than Second_Order_Bessel_Function, but then
their "programs" are usually short).

    i++

that's a nice neat notation, especially when composed in a complex
expression, but

    Average_Daily_Rate_Of_Pay++

makes people laugh (I tell that as a joke, and C programmers as well as
Ada programmers laugh).

somehow, the ++ just ain't so neat in the context of long names.

How important is this effect? I don't know! 
To what extent does it explain the empirical observation of difference
 in style between C++ programmers and Ada programmers? I don't know!

I hasten to add that the universal quantifiers here are of course bogus,
not ALL C++ programmers choose junk names, and not all Ada programmers
choose good names (the most noticable counter examples I have seen in
both cases come from recently translplanted programmers, C++ programmers
trying to write Ada, or vice versa).

I would also add to this thread that the mere fact that there exists a
person who can easily read X does not mean that X is readable. I once
had a student who gaily wrote thousands of lines of uncommented assembly
language, and could read it just fine :-)




  reply	other threads:[~1994-10-05 13:28 UTC|newest]

Thread overview: 43+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1994-10-05  3:00 Easily-Read C++? Ken Garlington
1994-10-05  9:42 ` Pierre Castori
1994-10-05 13:28   ` Robert Dewar [this message]
1994-10-06  2:20     ` Benjamin Ketcham
     [not found]     ` <CxDL8H.KGE@csn.org>
     [not found]       ` <milodCxH2E4.7F4@netcom.com>
     [not found]         ` <CxHJv0.Kw0@csn.org>
     [not found]           ` <DAG.94Oct11080229@bellman.control.lth.se>
     [not found]             ` <37du0k$ir2@gnat.cs.nyu.edu>
1994-10-12  3:19               ` Attractive comments better? R_Tim_Coslet
1994-10-13  1:35               ` Michael Feldman
1994-10-12 17:03           ` Easily-Read C++? John DiCamillo
1994-10-05 14:26 ` Eric S. Sessoms
1994-10-05 17:47 ` Kevin Cline
1994-10-05 22:02   ` Robert Dewar
1994-10-05 22:23     ` Richard Kenner
     [not found]       ` <124377@cup.portal.com>
1994-10-11 18:11         ` David Weller
1994-10-11 18:43         ` Robert Dewar
1994-10-12 13:15           ` Norman H. Cohen
1994-10-12 14:10             ` Robert Firth
1994-10-13 19:33             ` John D. Reading
1994-10-13  0:51         ` Keith Thompson @pulsar
1994-10-05 18:24 ` Magnus Kempe
     [not found] ` <EACHUS.94Oct6101347@spectre.mitre.org>
     [not found]   ` <371a3p$nos@gnat.cs.nyu.edu>
     [not found]     ` <1994Oct7.153254.29848@swlvx2.msd.ray.com>
     [not found]       ` <374uke$8mo@delphi.cs.ucla.edu>
     [not found]         ` <37bno4$ko4@gnat.cs.nyu.edu>
1994-10-11 13:00           ` Robert Firth
1994-10-11 13:44             ` Casper H.S. Dik
1994-10-11 19:03               ` Robert Dewar
1994-10-12 16:38               ` John DiCamillo
1994-10-11 18:52             ` Robert Dewar
1994-10-12 13:49               ` Norman H. Cohen
     [not found]           ` <37eej8$6ie@siberia.gatech.edu>
1994-10-11 18:55             ` Robert Dewar
1994-10-12 13:35               ` John M. Mills
1994-10-12 19:48                 ` Robert Dewar
     [not found]         ` <CxFr5B.K1G@news.otago.ac.nz>
     [not found]           ` <DAG.94Oct10075533@bellman.control.lth.se>
1994-10-11 17:50             ` Norman H. Cohen
     [not found]     ` <373vd2$39n@theopolis.orl.mmc.com>
     [not found]       ` <CxBvq7.GrH@inmet.camb.inmet.com>
     [not found]         ` <37bnic$kj2@gnat.cs.nyu.edu>
1994-10-11 18:02           ` Norman H. Cohen
     [not found] ` <1994Oct7.110309@di.epfl.ch>
     [not found]   ` <DAG.94Oct7204142@bellman.control.lth.se>
     [not found]     ` <1994Oct7.210111.4494@nosc.mil>
     [not found]       ` <374i3o$c87@Starbase.NeoSoft.COM>
1994-10-12 17:37         ` "Tag" (Was: Easily-Read C++? (NOT)) David Emery
     [not found] <3719k1$11gt@watnews1.watson.ibm.com>
     [not found] ` <85C92963672@annwfn.com>
1994-10-11 18:37   ` Easily-Read C++? Norman H. Cohen
1994-10-12 16:54     ` David Emery
1994-10-14 21:13       ` Kevin Cline
1994-10-21 14:38         ` Thomas M. Breuel
1994-10-22  3:10           ` Michael M. Bishop
1994-10-26  0:39             ` -mlc-+Schilling J.
1994-10-27 14:54               ` Bob Duff
1994-10-27 15:35                 ` Richard Kenner
1994-10-27 23:09                 ` Robert Dewar
1994-11-01 21:19                 ` Adam Beneschan
1994-11-02  0:46                   ` Bob Duff
  -- strict thread matches above, loose matches on Subject: below --
1994-10-12  3:06 Easily-Read C++ Ken Garlington
1994-10-14 10:50 Easily-Read C++? Bob Wells #402
replies disabled

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