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=0.2 required=5.0 tests=BAYES_00,INVALID_MSGID, REPLYTO_WITHOUT_TO_CC autolearn=no autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,f92fbb4a0420dd57 X-Google-Attributes: gid103376,public From: mbk@caffeine.engr.utk.edu (Matt Kennel) Subject: Re: some questions re. Ada/GNAT from a C++/GCC user Date: 1996/04/09 Message-ID: <4kengv$d8f@gaia.ns.utk.edu>#1/1 X-Deja-AN: 146615925 references: <3160E91E.1627@lfwc.lockheed.com> <316120DC.1F93@lfwc.lockheed.com> <316241DF.1B48@lfwc.lockheed.com> organization: University of Tennessee, Knoxville and Oak Ridge National Laboratory reply-to: kennel@msr.epm.ornl.gov newsgroups: comp.lang.ada Date: 1996-04-09T00:00:00+00:00 List-Id: Ken Garlington (garlingtonke@lfwc.lockheed.com) wrote: : Robert A Duff wrote: : > : > >What about a variable declaration that's not so plain? Would I still : > >need a block statement in that case? : > : > I think you should be able to introduce a named block wherever you like. : OK, but what is the impact to maintenance if Ada supports both "declaration : on the fly" and "declaration within blocks"? If I introduce a "simple : declaration" (whatever that means) without the need to explicitly highlight : the declarative region, and then I start slowly increasing the complexity : of that declarative region, do I get into trouble? My personal experience with a modern OO language which has only "declare on the fly" and even static type inference ("don't declare manually at all") is that these issues matter very little, as they should all be localized inside a single implementation routine. What matters *much* more is to keep track of the declaration of routines and the combination of routines which make up a class---in Ada, a package. Bottom line: I think it advisable to be "liberal" inside the implementation of subroutines for programmer convenience, but to be "anal" and "strict" in the package and routine interfaces. : > : > - Bob