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,FREEMAIL_FROM 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 02:59:59 PST Path: archiver1.google.com!news1.google.com!newsfeed.stanford.edu!news.tele.dk!small.news.tele.dk!193.162.153.118!news.tele.dk!not-for-mail Message-ID: <3CF9EC9F.9020203@yahoo.com> Date: Sun, 02 Jun 2002 11:59:59 +0200 From: David Rasmussen User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:0.9.9) Gecko/20020412 Debian/0.9.9-6 MIME-Version: 1.0 Newsgroups: comp.lang.ada Subject: Re: Localized Variable Declaration References: <3CF77998.9040806@yahoo.com> <3CF77CDA.3090805@yahoo.com> <3CF78D3D.3030400@yahoo.com> <3CF79AAD.70501@yahoo.com> <8db3d6c8.0206011821.1e64ae72@posting.google.com> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit Organization: TDC Internet NNTP-Posting-Host: 195.215.62.2 X-Trace: 1023011999 dtext.news.tele.dk 58779 195.215.62.2 X-Complaints-To: abuse@post.tele.dk Xref: archiver1.google.com comp.lang.ada:25191 Date: 2002-06-02T11:59:59+02:00 List-Id: steve_H wrote: > David Rasmussen wrote in message news:<3CF79AAD.70501@yahoo.com>... > > >>The variables are declared when used, and not some centralized place in the >>beginning. >> > > > But this is why having variables declared in ONE place is better. > > I always know where to go look to find where the variable was created. > > In C++, I have to go scan the function code up and down to find where it was > declared. > > How could this be better? 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. /David