comp.lang.ada
 help / color / mirror / Atom feed
From: john@assen.demon.co.uk (John McCabe)
Subject: Re: Language Choice and Coding style
Date: 1996/07/04
Date: 1996-07-04T00:00:00+00:00	[thread overview]
Message-ID: <836505506.6472.0@assen.demon.co.uk> (raw)
In-Reply-To: dewar.836067024@schonberg


dewar@cs.nyu.edu (Robert Dewar) wrote:

<..snip..>

>I strongly disagree. In theory this sounds OK, but style covers much more
>than simple rules that can be messed around with by a formatting editor.
>If a team is not willing to agree on unimportant little things, but insists
>on going their own individual way, I think you have little hope of 
>achieving a high degree of coding style consistency, something I think
>is vital for the success of software projects with more than one person
>involved.

This all really depends on how you define "coding style" and where you
consider code formatting to be a particularly important part of that. 

Personally I consider "coding style" to mean how things are done
rather than the way they look. If I can give an example of one style
compared to another (from C as it is a very obvious and common one):

	a = ((x < 0) ? y : z);

and

	if (x < 0)
	{
		a = y;
	}
	else
	{
		a = z;
	}

are two ways of doing the same thing, but using what I consider to be
different coding styles.

The point is, there can be many different and equally valid ways of
producing e.g. an algorithm code. No one can say they know the best
way of doing it, so why should they enforce a style that they are
comfortable with? Not only could that lead to inefficient code, but
allowing coders more freedom to do things the way they want to is also
likely to be a learning experience for the others in the team.

Code formatting on the other hand is a very mechanical thing and can
be easily modified by machines into a format that a coder feels most
comfortable with. I find that as long as code looks the same (in terms
of formatting), then someone else's style of coding becomes much
easier for me to understand.

I would therefore consider a comfortable format of code to be far more
important for maintenance purposes than enforcing a particular style,
and if machines (by way of formatting editors) can help in this then
it should be actively encouraged.

Best Regards
John McCabe <john@assen.demon.co.uk>





  reply	other threads:[~1996-07-04  0:00 UTC|newest]

Thread overview: 84+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1996-06-21  0:00 Language Choice and Coding style Nasser Abbasi
1996-06-21  0:00 ` Robert Dewar
1996-06-24  0:00   ` Dr. John B. Matthews
1996-06-21  0:00 ` The Amorphous Mass
1996-06-23  0:00   ` Robert Dewar
1996-06-27  0:00     ` Adam Beneschan
1996-06-28  0:00       ` Peter Hermann
1996-06-28  0:00         ` Robert A Duff
1996-06-29  0:00           ` Samuel Mize
1996-06-29  0:00             ` Robert Dewar
1996-07-04  0:00               ` John McCabe [this message]
1996-07-04  0:00               ` Peter Hermann
1996-07-04  0:00                 ` Robert Dewar
1996-07-05  0:00                   ` John McCabe
1996-07-05  0:00                   ` software engineering and the notion of authorship Fergus Henderson
1996-07-08  0:00                     ` Peter Hermann
1996-07-08  0:00                     ` Jakob Engblom
1996-07-08  0:00                       ` John Byerly
1996-07-08  0:00                       ` Fergus Henderson
1996-07-09  0:00                         ` Richard A. O'Keefe
1996-07-09  0:00                           ` Fergus Henderson
1996-07-11  0:00                           ` Paul Eggert
1996-07-08  0:00                       ` The Amorphous Mass
1996-07-08  0:00                         ` Robert Dewar
1996-07-15  0:00                     ` Ralph Silverman
1996-07-15  0:00                       ` Fergus Henderson
1996-07-17  0:00                       ` Robert Dewar
1996-07-19  0:00                         ` Mike Curtis
1996-07-04  0:00               ` Language Choice and Coding style Dan Evens
1996-07-02  0:00             ` John McCabe
1996-07-02  0:00               ` Samuel Mize
1996-07-03  0:00                 ` John McCabe
1996-07-03  0:00                 ` Jeff Dege
1996-07-03  0:00                   ` Robert Dewar
1996-07-04  0:00                     ` Phil Howard
1996-07-04  0:00                       ` Peter Hermann
1996-07-04  0:00                     ` John McCabe
1996-06-28  0:00         ` Robert Dewar
1996-07-02  0:00           ` John McCabe
1996-06-28  0:00         ` John McCabe
1996-07-06  0:00       ` Laurent Guerby
1996-07-19  0:00       ` software engineering and the notion of authorship Andrew Gierth
1996-06-27  0:00     ` Language Choice and Coding style The Amorphous Mass
1996-06-23  0:00   ` mfinney
1996-06-23  0:00     ` Robert Dewar
1996-06-26  0:00       ` mfinney
1996-06-21  0:00 ` Giuliano Carlini
1996-06-21  0:00 ` David Weller
1996-06-21  0:00 ` David Emery
1996-06-21  0:00 ` Louis Tribble
1996-06-21  0:00 ` Jerry van Dijk
1996-06-24  0:00   ` Adam Beneschan
1996-06-23  0:00 ` Darin Johnson
     [not found] ` <4qeu56$52r@news.interpath.net>
1996-06-23  0:00   ` Nasser Abbasi
1996-06-24  0:00 ` John McCabe
1996-06-24  0:00   ` Peter Hermann
1996-07-01  0:00     ` Alan Brain
1996-07-02  0:00       ` John McCabe
1996-06-24  0:00   ` Adam Beneschan
1996-06-26  0:00   ` Ian Ward
1996-06-26  0:00   ` Nasser Abbasi
1996-06-24  0:00 ` Michael R. Hartwig
1996-06-24  0:00 ` Theodore E. Dennison
1996-06-24  0:00 ` Andreas Schoter
1996-06-29  0:00 ` Rich Maggio
1996-06-29  0:00 ` Samuel Mize
1996-07-01  0:00   ` Richard A. O'Keefe
1996-07-02  0:00     ` Samuel Mize
1996-07-03  0:00       ` Robert Dewar
1996-07-08  0:00     ` ++           robin
1996-07-02  0:00 ` Nasser Abbasi
1996-07-03  0:00   ` steidl
1996-07-05  0:00     ` Samuel Mize
1996-07-06  0:00     ` N. L. Sizemore
1996-07-08  0:00       ` steidl
     [not found] ` <JSA.96Jun26141502@organon.com>
1996-07-01  0:00   ` Russel A Hill
1996-07-01  0:00     ` Robert Dewar
1996-07-08  0:00       ` Russel A Hill
1996-07-02  0:00     ` Richard A. O'Keefe
1996-07-02  0:00   ` Jon S Anthony
1996-07-03  0:00   ` Mark Eichin
     [not found] <835824850.11044.0@assen.demon.co.uk>
1996-06-27  0:00 ` Ian Ward
1996-06-27  0:00   ` John McCabe
  -- strict thread matches above, loose matches on Subject: below --
1996-07-05  0:00 Robert C. Leif, Ph.D.
replies disabled

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