comp.lang.ada
 help / color / mirror / Atom feed
From: Samuel Mize <smize@link.com>
Subject: Re: Ada95 Pretty-Printers
Date: 1997/06/13
Date: 1997-06-13T00:00:00+00:00	[thread overview]
Message-ID: <33A157AA.1F2F3650@link.com> (raw)
In-Reply-To: 33A02793.431C@sprintmail.com


John G. Volan (quoting himself) wrote that Apex does this:

> > if Condition
> >   then
> >   Statement;
> > elsif Condition
> >   then
> >   Statement;
> > else
> >   Statement;
> > end if;
> 
> (The "then" keywords are indented two spaces rather than aligned left.)
> 
> > case Expression is
> >   when Choice =>
> >     Statement;
> >   when Choice =>
> >     Statement;
> > end case;
> 
> (The "when" clauses add a level of indent we don't want, so two levels
> of indent have to be unrolled after the last Statement.)
> 
> > Loop_Name:
> >   while Condition
> >     loop
> >     Statement;
> >   end loop Loop_Name;
> 
> (The Loop_Name introduces an extra level of indent we don't want; and
> the "loop" keyword is indented two spaces rather than aligned with the
> "while".)
> 
> > Block_Name:
> >   begin
> >     Statement;
> >   exception
> >     when Exception_Name =>
> >       Statement;
> >   end Block_Name;
> 
> (The "when" clauses add a level of indent we don't want, so two levels
> of indent have to be unrolled after the last Statement; and the
> Block_Name adds a whole other level of indent.)


All this is in accordance with the indentation shown in the ARM, but I
personally just hate it.  I don't think a loop or block should be
indented
just because it's named.  I feel that the "when" clauses are a parallel
part of the structure.  It makes no more sense to indent "when" or
"then"
than it does to indent "else."  Obviously, this is all just personal
opinion.  But I'm glad to see a smart guy and a significant company
agreeing with me :-) .

Sam Mize

--
-- Samuel Mize    (817) 619-8622    smize@link.com    "Team Ada"
-- Hughes Training Inc.  PO Box 6171 m/s 400, Arlington TX 76005




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

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <339C58A6.4D5A@sprintmail.com>
1997-06-10  0:00 ` Ada95 Pretty-Printers Samuel Mize
1997-06-10  0:00   ` John G. Volan
1997-06-10  0:00     ` Spam Hater
1997-06-10  0:00       ` Spam Hater
1997-06-16  0:00     ` Greg Gicca @pulsar
1997-06-10  0:00   ` John G. Volan
1997-06-11  0:00     ` Samuel Mize
1997-06-12  0:00     ` John G. Volan
1997-06-13  0:00       ` Samuel Mize [this message]
1997-06-14  0:00         ` Robert Dewar
1997-06-14  0:00           ` Samuel Mize
1997-06-14  0:00             ` Robert Dewar
1997-06-14  0:00         ` Tom Phinney
1997-06-12  0:00     ` Robert Dewar
1997-06-10  0:00   ` stuman
1997-06-10  0:00 ` Anonymous
1997-06-10  0:00   ` John G. Volan
1997-06-11  0:00 ` Matthew Heaney
1997-06-11  0:00 ` Rolf Ebert
1997-06-11  0:00   ` John G. Volan
1997-06-12  0:00 ` Jeff Burns
replies disabled

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