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.7 required=5.0 tests=BAYES_00,INVALID_DATE, MSGID_SHORT,REPLYTO_WITHOUT_TO_CC autolearn=no autolearn_force=no version=3.4.4 Path: utzoo!utgpu!jarvis.csri.toronto.edu!cs.utexas.edu!swrinde!zaphod.mps.ohio-state.edu!usc!trwind!saturn!simpson From: simpson@saturn.ind.trw.com (Scott Simpson) Newsgroups: comp.lang.ada Subject: Re: Ada functions versus arrays (i.e. () vs [] ) Message-ID: <3011@trwind.UUCP> Date: 2 Mar 90 23:46:41 GMT References: <184@trwacs.UUCP> <598@software.software.org> <5619@crdgw1.crd.ge.com> <608@software.software.org> <6281@bd.sei.cmu.edu> Sender: news@trwind.UUCP Reply-To: simpson@trwind.trw.com (Scott Simpson) Organization: TRW Information Networks Division, Torrance, CA List-Id: In article <6281@bd.sei.cmu.edu> firth@sei.cmu.edu (Robert Firth) writes: >In article <608@software.software.org> blakemor@software.org (Alex Blakemore) writes: > >>I agree that side effects are best avoided - they definitely mess up this >>scheme. I assume the language designers left them in for the >>very few times when they are justifiable (e.g. next_random_number). >>Quite possibly a language design error forced on them by C programmers :-) > >As I recall, we left them in for the same reason Algol-60 did: it is >impossible to rule out the bad uses without also ruling out the good >ones. It is the responsibility of the programmer not to employ the >bad uses. Meyer summed this up much more beautifully I think in his book Object-Oriented Software Construction when he said that side-effects are harmless when they only affect the *concrete* state and not the *abstract* state. This division is important. See section 7.7.3, page 135 of OOSC. Scott Simpson TRW Information Networks Division simpson@trwind.trw.com