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-05-31 08:26:43 PST Path: archiver1.google.com!news1.google.com!newsfeed.stanford.edu!canoe.uoregon.edu!csulb.edu!newshub.sdsu.edu!west.cox.net!cox.net!newspeer1-gui.server.ntli.net!ntli.net!news8-gui.server.ntli.net.POSTED!53ab2750!not-for-mail From: "martin.m.dowie" Newsgroups: comp.lang.ada References: <3CF77998.9040806@yahoo.com> <3CF77CDA.3090805@yahoo.com> <3CF78D3D.3030400@yahoo.com> Subject: Re: Localized Variable Declaration X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 6.00.2600.0000 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2600.0000 Message-ID: Date: Fri, 31 May 2002 16:26:34 +0100 NNTP-Posting-Host: 62.252.152.108 X-Complaints-To: abuse@ntlworld.com X-Trace: news8-gui.server.ntli.net 1022858802 62.252.152.108 (Fri, 31 May 2002 16:26:42 BST) NNTP-Posting-Date: Fri, 31 May 2002 16:26:42 BST Organization: ntlworld News Service Xref: archiver1.google.com comp.lang.ada:25087 Date: 2002-05-31T16:26:34+01:00 List-Id: "David Rasmussen" wrote in message news:3CF78D3D.3030400@yahoo.com... > int whatever(int foo) > { > ... > ... > { // local scope starts here > int local = 42; > .... > } // and ends here > ... > } now you have 3 lines not 1! ;-) > So you can do the same in C++ as in Ada, and more. It's usually the > other way around. And usually Ada has a good reason for doing things > they way it does it. I just don't understand the justification for this > limitation. Consider this: All this is boils down to a choice of syntax and Ada is always going to look heavy on that count - is there any area that doesn't have Ada coming in with more keystrokes/source lines? It had never struck me as being terribly important, if a routine is getting complex enough to warrant nested within nested declarative blocks then I usually replace one or more with local subprograms (pragma Inlined if really necessary).