From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: X-Spam-Status: No, score=-1.3 required=5.0 tests=BAYES_00,INVALID_MSGID autolearn=no autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,7508aa0d80b8bf66 X-Google-Attributes: gid103376,public From: Robert A Duff Subject: Re: Inheritance and Polymorphism in Ada !! Date: 1999/10/20 Message-ID: #1/1 X-Deja-AN: 538493719 Sender: bobduff@world.std.com (Robert A Duff) References: <7u64k3$l1d$1@hiline.shinbiro.com> <3806DC34.1513E8B1@frqnet.de> <7u7o36$tv8$1@nntp6.atl.mindspring.net> <38077b65_1@news1.prserv.net> <7uitmi$2vg$1@nnrp1.deja.com> Organization: The World Public Access UNIX, Brookline, MA Newsgroups: comp.lang.ada Date: 1999-10-20T00:00:00+00:00 List-Id: Robert Dewar 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.