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.9 required=5.0 tests=BAYES_00,FORGED_GMAIL_RCVD, FREEMAIL_FROM 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!postnews.google.com!v45g2000cwv.googlegroups.com!not-for-mail From: "Harald Korneliussen" Newsgroups: comp.lang.ada Subject: Re: How come Ada isn't more popular? Date: 5 Feb 2007 04:16:05 -0800 Organization: http://groups.google.com Message-ID: <1170677765.539215.44840@v45g2000cwv.googlegroups.com> 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> <1pli2ou515l1z$.jfgoxqdhukav.dlg@40tude.net> NNTP-Posting-Host: 213.184.192.82 Mime-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" X-Trace: posting.google.com 1170677790 4033 127.0.0.1 (5 Feb 2007 12:16:30 GMT) X-Complaints-To: groups-abuse@google.com NNTP-Posting-Date: Mon, 5 Feb 2007 12:16:30 +0000 (UTC) In-Reply-To: <1pli2ou515l1z$.jfgoxqdhukav.dlg@40tude.net> User-Agent: G2/1.0 X-HTTP-UserAgent: Mozilla/5.0 (Windows; U; Windows NT 5.1; nb-NO; rv:1.8.1.1) Gecko/20061204 Firefox/2.0.0.1,gzip(gfe),gzip(gfe) Complaints-To: groups-abuse@google.com Injection-Info: v45g2000cwv.googlegroups.com; posting-host=213.184.192.82; posting-account=5vUApw0AAADF5Kx_4-L9ZPdL9lZywYoQ Xref: g2news2.google.com comp.lang.ada:8959 Date: 2007-02-05T04:16:05-08:00 List-Id: > On Sun, 04 Feb 2007 23:33:40 +0100, Markus E Leypold wrote: > > The function of the second tree? What are you talking about? Let me > > repeat: In pure functional languages nothing "changes". On 5 Feb, 10:20, "Dmitry A. Kazakov" wrote: > 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. With respect, Dmitry, this is nonsense. There is no way of removing a node from A at all (this is a feature of pure functional languages, like Haskell and Clean), and so you are sure that B will always be the maximal path of A. A can not be redefined. What you can do is define a new tree, which is a function of the old tree. Naturally, this new tree may have another maximal path. You will not find that path in B, as B is the path of A, not the path of f(A)! That A and f(A) may share structure in the implementation is irrelevant for the correctness of the program. It is relevant for memory use, certainly, but since the structures are immutable, it does not affect correctness, and the program is absolutely not "broken". > The programmer has to manually evaluate Max_Path(f(A)). "Maximal path of" is non-functional. "Maximal path of" is a function. It takes a tree, and returns the maximal path of that tree. It does not take a reference to a mutable data structure or something. If it did, it would not be a function, because it could give different results when passed the same reference. But yes, once you have a new value, this does not update your old values in any way, so perhaps you have to "manually" derive some further values from this. (It's also quite reasonable to speak of "newer" and "older" values in functional languages, as in mathemathics. If value B is derived from value A, of course value A must be computed first, and A is the "old" value, B is the "new". A is still very much around, however!)