comp.lang.ada
 help / color / mirror / Atom feed
From: dewar@merv.cs.nyu.edu (Robert Dewar)
Subject: Re: Ada95 Pretty-Printers/Coding styles
Date: 1997/06/20
Date: 1997-06-20T00:00:00+00:00	[thread overview]
Message-ID: <dewar.866853094@merv> (raw)
In-Reply-To: 5o9f0s$it2@client2.news.psi.net


In an advertisement for Ada Assured we read

<<No offense intended Robert, but this sounds very subjective to be much of a
style guide.  It may work at a small company like ACT, and I understand your
code is beautiful, so it does work for you.  But this model doesn't sound
very reasonable for large defense and aerospace companies where thousands of
engineers are working on hundreds of projects (and where staffing is
inconsistent and people work in multiple languages).  Vague aesthetics and
individual interpretation of good style are not consistent with an
engineering approach to large scale complex manufacturing (which is what
they're doing).  Their code needs to be understandable, not just internally,
but to their customers and to other contractors who may have to maintain or
update their code.>>

I suspect you have not read any of the material here and are just guessing.
In fact the kind of mechanical rule that Ada Assured can enforce IS enforced
by a mechanical tool at ACT, namely the -gnatg switch, and the documentation
of these requirements is very precise, it can be found in the files style.ads
and style.adb.

These rules are by no means trivial, they include things like

a) specs required for all procedures
b) capitalization in a use of an identifier must match the declaration


(I choose these two, because they need quite a bit of semantic help from
the compiler, i.e. these rules are not trivial syntactic gizmos alone, 
though trivial syntactic gizmos are included -- although even there, I fined
that many tools I have seen would be incapable of enforcing our commenting
layout standard).

So, yes, I agree that tools like Ada Assured are useful, however, for maximum
utility I think it is important that they be embedded into the compiler, and
not separate from it for two reasons:

1. For some of the more subtle stuff, you need the full power of an Ada
compiler anyway.

2. That way, it is easy to insist on its absolutely systematic use. In our
environment it is simply not possible to check in code that has not been
checked out by this tool, and that comes not from some barrier at the
checkin stage, but because EVERY compilation ALWAYS checks.

The points in my note that you identified as vague go FAR beyond anything
that can be done automatically by a tool. 

And yes, I agree, it is probably impossible to get a large company to
apply this kind of consistency company wide, but that is not necesarily
a requyirement, the more important thing is to apply this kind of uniformity
to a single project, or at least to a single large component of a project.





  reply	other threads:[~1997-06-20  0:00 UTC|newest]

Thread overview: 23+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1997-06-16  0:00 Ada95 Pretty-Printers/Coding styles Chris Sparks (Mr. Ada)
1997-06-16  0:00 ` Robert Dewar
1997-06-17  0:00   ` nickerson
1997-06-21  0:00     ` Robert Dewar
1997-06-25  0:00       ` Jeff Burns
1997-06-26  0:00         ` Robert Dewar
1997-06-26  0:00         ` Robert Dewar
1997-06-26  0:00           ` Wes Groleau
1997-07-03  0:00       ` Shmuel (Seymour J.) Metz
1997-06-17  0:00   ` Mats.Weber
1997-06-17  0:00     ` Robert Dewar
1997-06-18  0:00       ` Jeff Burns
1997-06-20  0:00         ` Robert Dewar [this message]
1997-06-20  0:00         ` nma123
1997-06-20  0:00           ` Jeff Burns
1997-07-03  0:00             ` Shmuel (Seymour J.) Metz
1997-07-09  0:00               ` Robert Dewar
1997-07-11  0:00               ` jeff
1997-07-16  0:00                 ` Robert Dewar
1997-06-18  0:00   ` Stephen Garriga
  -- strict thread matches above, loose matches on Subject: below --
1997-06-17  0:00 Chris Sparks (Mr. Ada)
1997-06-20  0:00 ` Geert Bosch
1997-06-23  0:00 Chris Sparks (Mr. Ada)
replies disabled

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