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.9 required=5.0 tests=BAYES_00 autolearn=ham autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,f3437064e1091fec X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2003-07-14 11:51:03 PST Path: archiver1.google.com!news1.google.com!newsfeed.stanford.edu!news-spur1.maxwell.syr.edu!news.maxwell.syr.edu!sn-xit-03!sn-xit-01!sn-post-02!sn-post-01!supernews.com!corp.supernews.com!not-for-mail From: "Randy Brukardt" Newsgroups: comp.lang.ada Subject: Re: What evil would happen? Date: Mon, 14 Jul 2003 13:52:38 -0500 Organization: Posted via Supernews, http://www.supernews.com Message-ID: References: <5ad0dd8a.0307111151.4a08f95a@posting.google.com> X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 5.50.4807.1700 X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4910.0300 X-Complaints-To: abuse@supernews.com Xref: archiver1.google.com comp.lang.ada:40267 Date: 2003-07-14T13:52:38-05:00 List-Id: "Wojtek Narczynski" wrote in message news:5ad0dd8a.0307111151.4a08f95a@posting.google.com... > Hello, > > What would happen if a procedure could return a value like a function, > or a function could accept an out parameter? Would it make procedures > less procedural? Or impure functions even less impure? Or is there a > reason for this in compiler implementation details? > > I feel like with SML like tagged union datatypes I'd be done long > ago... Is there an AI for this maybe? No evil would happen. The world would continue. :-) However, its clear that it is never going to happen (see the result of AI-323). There is enough opposition to the idea that it could never get a consensus. So functions in Ada will continue to be able to have side effects, just not be able to show them in their specification. (A paraphrase of Robert Dewar). Note that the Object.Operation notation (if approved) will help that for tagged types, as that notation allows using access parameters without explicitly saying 'Access. (So, for a function with the first parameter as an access parameter, the call would look the same as an IN parameter). Randy. P.S. Do we have to discuss this AGAIN?