comp.lang.ada
 help / color / mirror / Atom feed
From: Marin David Condic <mcondic.nospam@acm.org>
Subject: Re: Bad coding standards - aesthetics are irrelevant
Date: Thu, 28 Dec 2000 15:16:56 -0500
Date: 2000-12-28T20:17:16+00:00	[thread overview]
Message-ID: <3A4B9FB8.AFD69726@acm.org> (raw)
In-Reply-To: 92fobl$f93$1@nnrp1.deja.com

While one can always come up with creative solutions to this sort of thing,
I think it still remains that there are going to be things about coding
style and conventions that cannot be solved by algorithm. This is
especially true where you get away from pure syntax and start to touch on
semantics. "Adhere to such-and-such convention whenever an object refers to
so-and-so..." (A certain class of constants or data items, for example.)

The method you propose would work, provided that all programmers on a
project correctly capitalized (according to project norms) their first use
of an identifier or, as you say, create a single file that contains the
most common acronyms, etc. It doesn't work the instant someone violates the
conventions on a first occurence.

Identifier capitalization is just one instance where automation can't
universally apply and definitely not the best example because there are
ways of at least mostly-automating it with some possible human
intervention. There are others that can't be dealt with as easily.

MDC

Erik Magnuson wrote:

> Way back when I wrote* an Ada pretty-printer, I used a simple rule:
> Preserve the case of the 1st usage you see for each identifier and make
> all the rest conform to that case. If you were processing multiple
> files, you could "seed" the pretty-printer with exceptions like
> Rotor_RPM. The other common approach is to have a second pass change
> all of the project std. acronyms, but I thought my approach was more
> general.

--
======================================================================
Marin David Condic - Quadrus Corporation - http://www.quadruscorp.com/
Send Replies To: m c o n d i c @ q u a d r u s c o r p . c o m
Visit my web site at:  http://www.mcondic.com/

    "Giving money and power to Government is like giving whiskey
    and car keys to teenage boys."

        --   P. J. O'Rourke
======================================================================





  reply	other threads:[~2000-12-28 20:16 UTC|newest]

Thread overview: 23+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2000-12-20 22:22 Bad coding standards - aesthetics are irrelevant Singlespeeder
2000-12-20 23:46 ` Larry Kilgallen
2000-12-21  4:12 ` Robert C. Leif, Ph.D.
2000-12-21 11:33   ` Robert Dewar
2000-12-21 15:59 ` Stephen Leake
2000-12-21 19:30   ` William Starner
2000-12-21 20:54     ` Florian Weimer
2000-12-22 21:33       ` William Starner
2000-12-22 14:57     ` Bruce or Tracy
2000-12-23  8:04       ` Simon Wright
2000-12-28  0:54         ` mark_lundquist
2000-12-22 15:06   ` Ira D. Baxter
2001-01-03 20:02   ` Wes Groleau
2000-12-21 23:46 ` Marin David Condic
2000-12-22  6:45   ` mark_lundquist
2000-12-28 16:05   ` Erik Magnuson
2000-12-28 20:16     ` Marin David Condic [this message]
2000-12-29  4:05       ` Robert Dewar
2000-12-29 12:19       ` Larry Kilgallen
2000-12-29 14:02       ` Tarjei T. Jensen
2000-12-29 16:23         ` Robert Dewar
2000-12-29 14:44       ` Erik Magnuson
2001-01-03 20:12   ` Wes Groleau
replies disabled

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