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,d1df6bc3799debed X-Google-Attributes: gid103376,public From: "Nick Roberts" Subject: Re: Not intended for use in medical, Date: 1997/05/14 Message-ID: <01bc6006$c13cf880$LocalHost@xhv46.dial.pipex.com>#1/1 X-Deja-AN: 241382111 References: <3.0.32.19970423164855.00746db8@mail.4dcomm.com> <5kmek2$9re@bcrkh13.bnr.ca> Organization: UUNet PIPEX server (post doesn't reflect views of UUNet PIPEX) Newsgroups: comp.lang.ada Date: 1997-05-14T00:00:00+00:00 List-Id: Robert Dewar wrote in article that the Ada 95 standard forces the heap to be used in the implementation of the standard random number generator packages, and suggests that this would have been avoided if Ada allowed 'in out' parameters in functions. This is true, but it would also have been avoided if the standard had simply specified procedures for obtaining the random numbers instead of functions. I believe it is a useful paradigm to always (or almost always) use procedures where there are side effects. However, is it not possible to implement Generator as a general access type, and then cause it to access an aliased variable (thus avoiding use of the heap)? Nick.