From: Robert A Duff <bobduff@world.std.com>
Subject: Re: Inheritance and Polymorphism in Ada !!
Date: 1999/10/20
Date: 1999-10-20T00:00:00+00:00 [thread overview]
Message-ID: <wcchfjmx7y5.fsf@world.std.com> (raw)
In-Reply-To: 7uitmi$2vg$1@nnrp1.deja.com
Robert Dewar <robert_dewar@my-deja.com> writes:
> I like the extra level of indentation, it shows clearly the
> scope of the variables that are introduced.
Well, I suppose this is a matter of taste, to some extent.
But why do you dislike this:
for I in Some_String'Range loop
X: Character renames Some_String(I); -- Not legal Ada.
X := To_Lower(X);
... maybe other uses of X ...
end loop;
?
It seems clear enough (to me) that the scope of X is the body of the
loop. There's *already* a level of indentation indicating that fact, so
why do you like to have an *extra* one?
Another example: I often want to add a statement at the beginning of a
procedure. I want it to happen before anything else. Maybe a debugging
print-out, for example. Or maybe some sort of checking on the input
parameters, like an assertion. If I put it after the "begin", I will
miss all the elaborations. So I have to surround the whole procedure
with a block statement, and *then* add my new statement. I wouldn't
mind adding the verbosity if it helped the reader, but I think it does
just the opposite.
- Bob
--
Change robert to bob to get my real email address. Sorry.
next prev parent reply other threads:[~1999-10-20 0:00 UTC|newest]
Thread overview: 31+ messages / expand[flat|nested] mbox.gz Atom feed top
1999-10-15 0:00 Inheritance and Polymorphism in Ada !! Chango Cho
1999-10-15 0:00 ` Ted Dennison
1999-10-15 0:00 ` Lutz Donnerhacke
1999-10-15 0:00 ` Andreas Winckler
1999-10-15 0:00 ` tmoran
1999-10-15 0:00 ` tmoran
1999-10-15 0:00 ` Richard D Riehle
1999-10-15 0:00 ` Matthew Heaney
1999-10-15 0:00 ` Richard D Riehle
1999-10-18 0:00 ` Robert A Duff
1999-10-19 0:00 ` Robert Dewar
1999-10-20 0:00 ` Robert A Duff [this message]
1999-10-21 0:00 ` Simon Wright
1999-10-21 0:00 ` Robert A Duff
1999-10-21 0:00 ` Paul Duquennoy
1999-10-21 0:00 ` Robert Dewar
1999-10-22 0:00 ` Matthew Heaney
1999-10-18 0:00 ` Robert Dewar
1999-10-23 0:00 ` Richard D Riehle
1999-10-24 0:00 ` Robert Dewar
1999-10-24 0:00 ` Brian Rogoff
1999-10-26 0:00 ` Robert Dewar
1999-10-25 0:00 ` Robert A Duff
1999-10-26 0:00 ` Robert Dewar
1999-10-26 0:00 ` Robert A Duff
1999-10-15 0:00 ` Stephane Barbey
1999-10-15 0:00 ` Matthew Heaney
1999-10-18 0:00 ` Robert A Duff
1999-10-18 0:00 ` Brian Rogoff
1999-10-15 0:00 ` Lutz Donnerhacke
1999-10-18 0:00 ` Robert A Duff
replies disabled
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox