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.3 required=5.0 tests=BAYES_00, REPLYTO_WITHOUT_TO_CC autolearn=no autolearn_force=no version=3.4.4 X-Google-Thread: 103376,11414a19b0e4a97a X-Google-NewGroupId: yes X-Google-Attributes: gida07f3367d7,domainid0,public,usenet X-Google-Language: ENGLISH,ASCII-7-bit Path: g2news1.google.com!news4.google.com!feeder2.cambriumusenet.nl!feed.tweaknews.nl!194.134.4.91.MISMATCH!news2.euro.net!newsfeed.freenet.ag!news.netcologne.de!ramfeed1.netcologne.de!newsfeed.arcor.de!newsspool3.arcor-online.net!news.arcor.de.POSTED!not-for-mail From: "Dmitry A. Kazakov" Subject: Re: Advice on selling Ada to a C shop Newsgroups: comp.lang.ada User-Agent: 40tude_Dialog/2.0.15.1 MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Reply-To: mailbox@dmitry-kazakov.de Organization: cbb software GmbH References: <101bf8f3-b823-45ee-9afd-40cbafb4b7a9@t26g2000prt.googlegroups.com> <774c25c4-3270-4ffb-ad19-366a0ab16659@i31g2000yqm.googlegroups.com> <84972d86-4850-4234-9224-ded8d12baf3b@b4g2000pra.googlegroups.com> <875done36srz$.mfu4cwmujuu2$.dlg@40tude.net> <4c372e40$0$6775$9b4e6d93@newsspool3.arcor-online.net> Date: Fri, 9 Jul 2010 17:08:08 +0200 Message-ID: <5pn7lhn1z6wy.1bd88107yo6kj$.dlg@40tude.net> NNTP-Posting-Date: 09 Jul 2010 17:08:08 CEST NNTP-Posting-Host: c3fcb997.newsspool2.arcor-online.net X-Trace: DXC=k_>I?=4BX64i6K;>iZ]763A9EHlD;3Yc24Fo<]lROoR18kF7enW;^6ZC`4\`mfM[68DC3TK@_5n=hYJ5 X-Complaints-To: usenet-abuse@arcor.de Xref: g2news1.google.com comp.lang.ada:12288 Date: 2010-07-09T17:08:08+02:00 List-Id: On Fri, 09 Jul 2010 16:12:15 +0200, Georg Bauhaus wrote: > On 09.07.10 15:45, Dmitry A. Kazakov wrote: >> On Fri, 9 Jul 2010 06:21:07 -0700 (PDT), Marco wrote: >> >>> Agreed - it is either a function that returns a value or a procedure >>> that can manipulate state not both >> >> Function manipulates the state of its result. >> >> (Stateless computing is a fiction) > > When the word "function" is just not present in > a programming language, is there a problem at all? > I mean, do people complain? > > Every terminating procedure does compute a function > from input variables and stores the result in some > output variables. Correct? No, because you have no way to denote them as an entity. Function in Ada is a procedure, which allows to denote its dedicated argument called result in a useful way: 1. in a transition context (temporary result) 2. supporting constraint inference (indefinite result) 3. constructing the result out of nothing, as an object, function is "equivalent" to the object it returns, and any object can thought as a function ("functional view"). > Do we want "function"? Or do we want "modifies"? We (I) want to keep the following three issues separated: 1. Syntax of a call 2. Purity of a subprogram 3. Ordering of side effects -- Regards, Dmitry A. Kazakov http://www.dmitry-kazakov.de