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.9 required=5.0 tests=BAYES_00 autolearn=ham autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,96ae138aab3beb03 X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2002-06-02 08:06:40 PST Path: archiver1.google.com!postnews1.google.com!not-for-mail From: dewar@gnat.com (Robert Dewar) Newsgroups: comp.lang.ada Subject: Re: Localized Variable Declaration Date: 2 Jun 2002 08:06:40 -0700 Organization: http://groups.google.com/ Message-ID: <5ee5b646.0206020706.7f8c690c@posting.google.com> References: <3CF77998.9040806@yahoo.com> <3CF77CDA.3090805@yahoo.com> <3CF78D3D.3030400@yahoo.com> <3CF79AAD.70501@yahoo.com> <8db3d6c8.0206011821.1e64ae72@posting.google.com> <3CF9EC9F.9020203@yahoo.com> NNTP-Posting-Host: 205.232.38.14 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 8bit X-Trace: posting.google.com 1023030400 12558 127.0.0.1 (2 Jun 2002 15:06:40 GMT) X-Complaints-To: groups-abuse@google.com NNTP-Posting-Date: 2 Jun 2002 15:06:40 GMT Xref: archiver1.google.com comp.lang.ada:25200 Date: 2002-06-02T15:06:40+00:00 List-Id: David Rasmussen wrote in message news:<3CF9EC9F.9020203@yahoo.com>... > I have already explained the benefits. I am not saying that this is > always better, and I know it is largely a matter of taste. But I can > assure you that there are real-life benefits in terms of ease of > maintenance and readability to doing this. I think it comes down to what > you're used to. No, you have not explained why it is useful to have special syntax to say that the scope is from here to the end, rather than explicitly specifying the scope. I find that in practice the C++ convention encourages sloppy programming in which you get scopes unintentially left open, for example, people write int t; t = x; x = y; y = t; for an exchange instead of the far preferable { int t; t = x; x = y; y = t; } why preferable? because in the first form, you do not know if it is important that the value of y ends up in t, so you have to remember that in case. Yes, the first form saves the writer two keystrokes but in Ada we don't care to save the writer effort :-)