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: a07f3367d7,39579ad87542da0e X-Google-Attributes: gida07f3367d7,public,usenet X-Google-NewGroupId: yes X-Google-Language: ENGLISH,ASCII X-Received: by 10.180.109.166 with SMTP id ht6mr1645672wib.0.1368583787998; Tue, 14 May 2013 19:09:47 -0700 (PDT) Path: hg5ni110158wib.1!nntp.google.com!feeder1.cambriumusenet.nl!feed.tweaknews.nl!194.109.133.87.MISMATCH!newsfeed.xs4all.nl!newsfeed1.news.xs4all.nl!xs4all!newspeer1.nac.net!border4.nntp.dca.giganews.com!border2.nntp.dca.giganews.com!nntp.giganews.com!newsfeed.news.ucla.edu!nrc-news.nrc.ca!News.Dal.Ca!news.litech.org!news.stack.nl!aioe.org!.POSTED!not-for-mail From: "Dmitry A. Kazakov" Newsgroups: comp.lang.ada Subject: Re: Seeking for papers about tagged types vs access to subprograms Date: Sat, 11 May 2013 11:08:51 +0200 Organization: cbb software GmbH Message-ID: <1qxgfubmxpo58$.1qaovzy6tbk41.dlg@40tude.net> References: <17ceq51ydy3s0.s94miqqzbg5w.dlg@40tude.net> <1vrhb7oc4qbob$.q02vuouyovp5$.dlg@40tude.net> <19lrzzbgm77v6.1dzpgqckptaj6.dlg@40tude.net> <1bfhq7jo34xpi.p8n2vq6yjsea.dlg@40tude.net> <12gn9wvv1gwfk.10ikfju4rzmnj.dlg@40tude.net> <1oy5rmprgawqs.1jz36okze0xju$.dlg@40tude.net> <1q2ql1e4rcgko.diszzq1mhaq8$.dlg@40tude.net> Reply-To: mailbox@dmitry-kazakov.de NNTP-Posting-Host: 15waz9CoS+eMakbyhTPyFQ.user.speranza.aioe.org Mime-Version: 1.0 X-Complaints-To: abuse@aioe.org User-Agent: 40tude_Dialog/2.0.15.1 X-Notice: Filtered by postfilter v. 0.8.2 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 8bit Date: 2013-05-11T11:08:51+02:00 List-Id: On Sat, 11 May 2013 09:58:38 +0200, Yannick Duch�ne (Hibou57) wrote: > Le Sat, 11 May 2013 08:37:15 +0200, Dmitry A. Kazakov > a �crit: >> That applies to stateful types only. Not every type is stateful. Bringing >> state into objects is considered bad practice. So bad, that it motivated >> some people to invent whole programming paradigms to avoid stateful object, >> e.g. functional programming. The sole idea of FP is to sweep states under >> the carpet. > > FP is about expression without side effects (pure expression), not about > refusing to express states. Side effect here = object[s] state. [You certainly cannot attribute it to the control flow state as you return to the definite point after expression is computed.] > There is no issue to have expressions > representing states and functions returning a state from a state, You return values not states. State of the object is the value it presently represents. State of flow is the source code location. > I've never seen so far, a paper about avoiding states in FP (what would be > state in FP anywhere, it not defined by the domain?). Else, out of > curiosity, I would welcome a pointer. FP-guys usually refuse to mention objects for evident reasons. -- Regards, Dmitry A. Kazakov http://www.dmitry-kazakov.de