comp.lang.ada
 help / color / mirror / Atom feed
From: Marin David Condic <condicma@bogon.pwfl.com>
Subject: Re: Gnat pretty printing
Date: 1998/12/15
Date: 1998-12-15T00:00:00+00:00	[thread overview]
Message-ID: <3676DF28.8C0C3C3A@pwfl.com> (raw)
In-Reply-To: 756f3f$pjn$1@nnrp1.dejanews.com

dennison@telepath.com wrote:
> 
> You could do what some of my anal-retentive (and english-imparied) coworkers
> took to doing: line up your commas or semicolons in the parameter lists with
> the parentheses! eg:
> 
>   procedure Pop
>     ( Item :    out Element_Type
>     ; List : in out List_Type
>     ; Flag : in     Boolean
>     ) ;
> 

That is a style which had not occurred to me. I guess it has the
advantage that each parameter starts in the same column, but it really
disturbs my eye that the terminating semicolon isn't after the thing it
terminates.

Maybe I could get used to it, but it would take time and possibly
chemical restraints.

> Another advantage of this that they touted is that a parameter may be added or
> deleted at the w/o having to worry about dealing with the "no comma after the
> last parameter" rule.
> 
> I was always quick to point out that they just moved the problem to the first
> parameter, and that it is very un-english like. But their overly mathematical
> minds just didn't care.
> 
Well, I don't know that a formatting style is going to keep you from
making syntax errors. The only excuse I can see for it is ease of
reading. I'd have to agree it only shifts the problem.

> What I actually prefer myself is the same as above, but with the semicolons
> where you'd expect them to be.
> 
Ahhhh, but then you've got two levels of indent! The level where the
parens occur, then the level where the parameters occur. It just doesn't
seem logical.

But as I said earlier, I doubt we are ever going to get total agreement
on formatting, but so long as it is neat we could probably tolerate the
differences.

I take it that for the most part, we could agree that the parameters
should occur on separate lines, that the colons line up and that the "in
out", "in     " and "   out" should all occupy the same amount of space
so that the type names line up. Or would that be presumptuous of me?
(Allowing for the fact that, like most style rules, there are always a
few exceptions where it makes sense to do something else...)

MDC
-- 
Marin David Condic
Real Time & Embedded Systems, Propulsion Systems Analysis
United Technologies, Pratt & Whitney, Large Military Engines
M/S 731-95, P.O.B. 109600, West Palm Beach, FL, 33410-9600
Ph: 561.796.8997         Fx: 561.796.4669
***To reply, remove "bogon" from the domain name.***

"Eagles may soar, but a weasle never gets sucked up into a jet engine."

        --  Author Unknown




  reply	other threads:[~1998-12-15  0:00 UTC|newest]

Thread overview: 37+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1998-12-09  0:00 Gnat pretty printing Matt Tyler
1998-12-09  0:00 ` dennison
1998-12-09  0:00 ` Marin David Condic
1998-12-09  0:00   ` David C. Hoos
1998-12-10  0:00   ` Martin C. Carlisle
1998-12-11  0:00     ` Michael F Brenner
1998-12-11  0:00       ` Stephane Barbey
1998-12-11  0:00       ` dewarr
1998-12-11  0:00       ` Bob Collins
1998-12-11  0:00       ` Bryce Bardin
1998-12-11  0:00     ` Marin David Condic
1998-12-12  0:00       ` Simon Wright
1998-12-14  0:00         ` dennison
1998-12-15  0:00         ` Marin David Condic
1998-12-15  0:00           ` dennison
1998-12-15  0:00             ` Marin David Condic [this message]
1998-12-16  0:00               ` Matthew Heaney
1998-12-16  0:00               ` dennison
1998-12-16  0:00                 ` Matthew Heaney
1998-12-16  0:00                 ` Chris Morgan
1998-12-18  0:00                   ` dewar
1998-12-17  0:00                 ` Dale Stanbrough
1998-12-15  0:00           ` Matthew Heaney
1998-12-15  0:00             ` Marin David Condic
1998-12-19  0:00               ` Lieven Marchand
1998-12-12  0:00       ` Robert A Duff
1998-12-13  0:00         ` Ehud Lamm
1998-12-15  0:00         ` Marin David Condic
1998-12-14  0:00     ` Robert I. Eachus
1998-12-21  0:00     ` BARDIN Marc
1998-12-09  0:00 ` Steve O'Neill
1998-12-10  0:00   ` okellogg
1998-12-11  0:00     ` dewarr
1998-12-09  0:00 ` David C. Hoos
1998-12-09  0:00 ` Tom Moran
1998-12-09  0:00   ` dennison
1998-12-09  0:00     ` Tom Moran
replies disabled

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