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!news4.google.com!news2.google.com!news.germany.com!nuzba.szn.dk!pnx.dk!news2.arglkargh.de!noris.net!newsfeed.arcor.de!newsspool2.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: Sun, 4 Feb 2007 22:29:56 +0100 Message-ID: NNTP-Posting-Date: 04 Feb 2007 22:29:55 CET NNTP-Posting-Host: 5286e57a.newsspool1.arcor-online.net X-Trace: DXC=TEJ=o9hnHifm7>ihJR;B_cic==]BZ:afn4Fo<]lROoRa^YC2XCjHcbig6Km>7?DBkaDNcfSJ;bb[eIRnRBaCd On Sun, 04 Feb 2007 21:18:55 +0100, Markus E Leypold wrote: > "Dmitry A. Kazakov" writes: > >> Or not, if you have relocatable objects, for instance. In general nothing >> in objects requires X'Address. There are other kinds of identity. For >> example id:X->T, where T is the type of X. >> >>> I fail to see how "identity" comes into the question of >>> "value-oriented" languages (your term, BTW) and represenation >>> sharing. GC is about references (to memory) and representation sharing >>> works with references to parts of another "value" (see lisp >>> lists). Represnattion sharing needs either reference counting >>> (inefficient, is also just some kind of instant GC) or GC. > >> The example you mentioned was a tree. Do you want to share subtrees between >> other trees? > > That's the way it is usually done in the implementation of a > functional language. They don't share subtrees they share memory (implementation), which is casual to the program semantics. >> 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? (:-)) No, you are wrong. In mathematics there is a notion of dependent and independent variables. Mathematics is extremely "non-functional". 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) >> You cannot answer these questions in terms of tree values. > > It doesn't make sense in terms of tree values, that is, in a purely > functional world. Of course it does. Consider a graph and its complement. Is it one value or two? [To prevent a possible discussion, consider an incomputable g.] >> Value vs. reference is a semantically irrelevant implementation >> detail. > > Sementically, yes. If we are talking about a functional language. Not, > if we talk about some imperative language. How so? Ada is imperative, yet Foo (A) should not depend on whether the compiler passes A by value or by reference. -- Regards, Dmitry A. Kazakov http://www.dmitry-kazakov.de