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!clyde.concordia.ca!uunet!mcsun!ukc!inmos!mph@lion.inmos.co.uk From: mph@lion.inmos.co.uk (Mike Harrison) Newsgroups: comp.lang.ada Subject: Re: Ada functions versus arrays (i.e. () vs [] ) Message-ID: <4318@ganymede.inmos.co.uk> Date: 2 Mar 90 10:42:43 GMT References: <184@trwacs.UUCP> <598@software.software.org> <5619@crdgw1.crd.ge.com> <608@software.software.org> Sender: news@inmos.co.uk Reply-To: mph@inmos.co.uk (Mike Harrison) Organization: INMOS Limited, Bristol, UK. List-Id: 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 :-) > Remember that preliminary Ada had procedures, functions *and* 'value-returning procedures'. Functions were not allowed to have side-effects, value-returning procedures were. It's all a long time ago but, I talked to several members of the design team about this, and if my memory is correct, the problem was that detecting side-effects in non-trivial functions (written in an imperative langauge) was impracticable (if not impossible). So they decided not to include in the language concepts which could not be enforced. The same argument (about side-effects) also led to the removal of the ASSERT statement. Mike, Michael P. Harrison - Software Group - Inmos Ltd. UK. ----------------------------------------------------------- UK : mph@inmos.co.uk with STANDARD_DISCLAIMERS; US : mph@inmos.com use STANDARD_DISCLAIMERS;