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,21960280f1d61e84 X-Google-Attributes: gid103376,public X-Google-Language: ENGLISH,ASCII-7-bit Path: g2news2.google.com!news3.google.com!news4.google.com!border1.nntp.dca.giganews.com!nntp.giganews.com!newsfeed00.sul.t-online.de!t-online.de!newsfeed.icl.net!newsfeed.fjserv.net!newsfeed.arcor.de!newsspool3.arcor-online.net!news.arcor.de.POSTED!not-for-mail From: "Dmitry A. Kazakov" Subject: Re: How come Ada isn't more popular? 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: <1169636785.504223.139630@j27g2000cwj.googlegroups.com> <45b8361a_5@news.bluewin.ch> <3pejpgfbki.fsf@hod.lan.m-e-leypold.de> <8lwt2zb8ga.fsf@hod.lan.m-e-leypold.de> <96swuj6qxb$.1k74rt53lh46v.dlg@40tude.net> Date: Mon, 5 Feb 2007 10:20:16 +0100 Message-ID: <1pli2ou515l1z$.jfgoxqdhukav.dlg@40tude.net> NNTP-Posting-Date: 05 Feb 2007 10:20:16 CET NNTP-Posting-Host: cd2602d2.newsspool4.arcor-online.net X-Trace: DXC=U=i`57TY7e:Tia]Ho99G504IUKkg2h;aNNIRTE]6 X-Complaints-To: usenet-abuse@arcor.de Xref: g2news2.google.com comp.lang.ada:8956 Date: 2007-02-05T10:20:16+01:00 List-Id: On Sun, 04 Feb 2007 23:33:40 +0100, Markus E Leypold wrote: > "Dmitry A. Kazakov" writes: > >> They don't share subtrees they share memory (implementation), which is >> casual to the program semantics. > > They share representation in the underlying system / VM / whatever you > call it. Whatever. They are not shared in the sense of aliasing, when you have more than one name for semantically same thing. 1+1 and 3-1 "share" 2. And this is irrelevant to where 2 might be allocated or how it were encoded. >>>> When a subtree C of a tree A changes, should it ("it" is an >>>> identity (:-)) in the tree B be changed as well? >>> >>> Change? There is no "change" in a functional world, only the >>> production of new values (i.e. new elements from a specific set, in >>> your case the set of all trees). >> >> (New values? What is the difference between new and old values? Do values >> carry RFID chips with timestamps? (:-)) > > Don't play dumb. There is certainly an order between value occuring in > a (functional) program. Values "occur"? [ You cannot fix the sentence above, it is semantically broken. ] >> Consider a mapping between nodes of two trees which has to be >> preserved. Now a function of the first tree is evaluated, what >> happens with the function of the second tree? > >> g >> A ------> B >> | | >> f| | id = nothing happens >> | | >> V g V >> f(A) ------> B (broken invariant) > > The function of the second tree? What are you talking about? Let me > repeat: In pure functional languages nothing "changes". Consider A = tree, B = its maximal path. When f(A) "occur," [a node is removed] what happens with B? Answer: nothing happens, the program is broken. The programmer has to manually evaluate Max_Path(f(A)). "Maximal path of" is non-functional. > It makes a > difference if you pass an access to a variable instead of passing the > variable as an in/out parameter and there is a difference if you > pass it as an in parameter. It does because access T and T are different types! T is not passed, access T is passed (by reference or by value). You could save much time if you just said that you wanted referential objects (pointers). Period. Now my question again, what prevents you from collecting objects accessed via controlled referential objects? -- Regards, Dmitry A. Kazakov http://www.dmitry-kazakov.de