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,59d24b21703c2885 X-Google-Attributes: gid103376,public From: mheaney@ni.net (Matthew Heaney) Subject: Re: Use of constants on EFA Date: 1997/11/06 Message-ID: #1/1 X-Deja-AN: 288179296 References: <63qkmc$8va$1@uttwil.bodensee.com> Organization: Estormza Software Newsgroups: comp.lang.ada Date: 1997-11-06T00:00:00+00:00 List-Id: In article <63qkmc$8va$1@uttwil.bodensee.com>, "Kevin Wilson" wrote: >However our customer (who must accept our code) states that constants >should only be declared at package level. They argue that in the >above example the constant will change its value if the code is executed >again, therefore is not fixed ! Perhaps this is a case of ambiguous requirements. Change the word "fixed" to the words "read-only," and maybe that'll make them happy. >Apart from the question of good programming practice, we rely heavily >on declaring local constants to read unconstrained array structures >returned by functions and without this would require untidy interfaces >and I would imagine more memory. The frequent use of declare blocks and localization of objects _is_ good programming practice, and you are doing the right thing. However, there is a certain tension between localization of an object and nesting - it often happens that you start getting nesting 3 or 4 levels deep, which can be bad for because this confuses programmers. So this means that objects will be localized, but not necessarily constant. >Any comments on this would be appreciated or if there are any people >reading this who were involved in the writing of this document and can >clarify what was meant by this statement please let me know. Tell your customer to stop micro-managing. If he's paying you to write software, then he has get out of your way, and let you do your job. -------------------------------------------------------------------- Matthew Heaney Software Development Consultant (818) 985-1271