comp.lang.ada
 help / color / mirror / Atom feed
From: Georg Bauhaus <bauhaus@futureapps.de>
Subject: Re: Quick question about Ada code formatting.
Date: Sat, 18 Feb 2006 16:36:35 +0100
Date: 2006-02-18T17:30:56+01:00	[thread overview]
Message-ID: <43f74bc0$0$13593$9b4e6d93@newsread2.arcor-online.net> (raw)
In-Reply-To: <m2vevcpzlq.fsf@grendel.local>

Simon Wright wrote:

> What always baffles me is how people will *not* train themselves to do
> what the style checker expects, and will *not* just fix the style
> warnings as they go.

A "hand writing" can work for one person, but not for an
other person. People can, and do fight over whose handwriting
viz. Ada style is better. Even neglecting the strong influence
that a font can have on appearance. But I think there are much
more important issues, and just -gnaty is overly strict here.

Good in my (limited) experience:

 - Consistent use of whatever non-typographical convention
   is in use.

 - Comb structure, and then tough may use 4 or 2 spaces or whatever.
   (so does the GNAT default style in constructs that are continued
   on the next line, so...) There is no real harm done when one
   block uses just 2 spaces for the indented lines, and another uses 5.
   I understand that some people go crazy when they find
   knife, spoon, and fork not properly aligned,no matter how good
   or bad the meal is.
   But programming has more to do with recipes and food than with
   the relative angle of eating tools during the "work".
   Also, play with the image of fish & chips in a paper box,
   framed by sterling cutlery

 - Compare how easily something is looked up in the code versus
   how easily something is read (left-right, top-down) in the
   code. These two processes are very different. Their analog
   in regular texts is table versus paragraph. There will have
   to be a compromise, then, unless you think that code that
   looks ordered is code that actually is ordered.

Slightly different handwritings will work. And it makes team mates
feel better, because they can adopt some of their very own hand
writing style nevertheless, without doing harm to others provided
everyone has retained some modicum of flexibility.

An additional proof of -gnaty being overly strict is
when it comes function names in GUI programming.
Many do not want to see '_'s in identifiers when they are
use to them without the underscores. Note the "used to"... :-)

There is a study (from Kent?, comparing MISRA C and other style
guides) that demonstrates how useless and wasteful typographic
sophistry is.

-- Georg



  reply	other threads:[~2006-02-18 15:36 UTC|newest]

Thread overview: 58+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-02-18 12:19 Quick question about Ada code formatting Peter C. Chapin
2006-02-18 13:00 ` Ludovic Brenta
2006-02-18 13:26 ` Simon Wright
2006-02-18 15:36   ` Georg Bauhaus [this message]
2006-02-18 16:52     ` Georg Bauhaus
2006-02-19  0:27     ` Simon Wright
2006-02-19  4:17       ` Jeffrey R. Carter
2006-02-19  9:51         ` Simon Wright
2006-02-19 15:23           ` Stephen Leake
2006-02-19 22:32             ` Simon Wright
2006-02-19 12:23       ` Georg Bauhaus
2006-02-19 22:23         ` Simon Wright
2006-02-22 22:15         ` Stephen Leake
2006-02-22 23:13           ` Georg Bauhaus
2006-02-23 12:50             ` Stephen Leake
2006-02-23 15:40               ` Jean-Pierre Rosen
2006-02-18 19:16   ` Pascal Obry
2006-02-18 21:16   ` Peter C. Chapin
2006-02-18 21:27     ` Pascal Obry
2006-02-19  0:10       ` Simon Wright
2006-02-19  9:41         ` Pascal Obry
2006-02-19  9:57           ` Simon Wright
2006-02-19 10:29             ` Pascal Obry
2006-02-19 12:31               ` Georg Bauhaus
2006-02-19 13:29                 ` Pascal Obry
2006-02-19 15:20                   ` Stephen Leake
2006-02-20  6:33                     ` Brian May
2006-02-20 18:07                       ` Pascal Obry
2006-02-22 22:21                       ` Stephen Leake
2006-02-20  8:17                     ` Lionel Draghi
2006-02-20 19:07                       ` Martin Krischik
2006-02-22 22:30                       ` Stephen Leake
2006-02-22 22:39                         ` Pascal Obry
2006-02-23 12:56                           ` Stephen Leake
2006-02-23 15:02                             ` Martin Krischik
2006-02-24 10:13                               ` Stephen Leake
2006-02-24 19:02                                 ` Martin Krischik
2006-02-24 23:29                                   ` Georg Bauhaus
2006-02-20 18:52                     ` Pascal Obry
2006-02-21  8:07                       ` Alex R. Mosteo
2006-02-22 22:32                         ` Stephen Leake
2006-02-23  6:02                           ` Jeffrey R. Carter
2006-02-23 12:58                             ` Stephen Leake
2006-02-19 19:25                   ` Jeffrey R. Carter
2006-02-19 20:00                     ` Pascal Obry
2006-02-19 22:27                       ` Simon Wright
2006-02-20  4:32                       ` Jeffrey R. Carter
2006-02-20 22:10                   ` Randy Brukardt
2006-02-22 22:36                     ` Stephen Leake
2006-02-23  9:49                       ` Alex R. Mosteo
2006-02-23 12:42                       ` Jean-Pierre Rosen
2006-02-24 10:15                         ` Stephen Leake
2006-02-20  7:11         ` Jean-Pierre Rosen
2006-02-21 21:23           ` Simon Wright
2006-02-19 15:17       ` Stephen Leake
2006-02-18 14:43 ` Martin Krischik
2006-02-18 20:21 ` Jeffrey R. Carter
2006-02-19 10:02 ` Dmitry A. Kazakov
replies disabled

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