comp.lang.ada
 help / color / mirror / Atom feed
From: mheaney@ni.net (Matthew Heaney)
Subject: Re: Use of constants on EFA
Date: 1997/11/06
Date: 1997-11-06T00:00:00+00:00	[thread overview]
Message-ID: <mheaney-ya023680000611970734130001@news.ni.net> (raw)
In-Reply-To: 63qkmc$8va$1@uttwil.bodensee.com


In article <63qkmc$8va$1@uttwil.bodensee.com>, "Kevin Wilson"
<Kevin.Wilson@konstanz.netsurf.de> 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
<mailto:matthew_heaney@acm.org>
(818) 985-1271




  parent reply	other threads:[~1997-11-06  0:00 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1997-11-05  0:00 Use of constants on EFA Kevin Wilson
1997-11-05  0:00 ` Robert Dewar
1997-11-05  0:00 ` Robert Dewar
1997-11-06  0:00   ` Peter Hermann
1997-11-06  0:00 ` Matthew Heaney [this message]
     [not found] ` <01bceece$4a6a85e0$423c63c3@default>
1997-11-11  0:00   ` Michael F Brenner
1997-11-12  0:00   ` Karel Th�nissen
1997-11-12  0:00     ` Dale Stanbrough
1997-11-17  0:00       ` KevinWilson
     [not found]       ` <01bcefb3$a8ac9b80$a93163c3@default>
1997-11-17  0:00         ` Richard Toy
  -- strict thread matches above, loose matches on Subject: below --
1997-11-10  0:00 Tom Moran
replies disabled

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox