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=-1.9 required=5.0 tests=BAYES_00 autolearn=ham autolearn_force=no version=3.4.4 X-Google-Thread: 103376,21960280f1d61e84 X-Google-Attributes: gid103376,public X-Google-Language: ENGLISH,ASCII-7-bit Newsgroups: comp.lang.ada Subject: Re: How come Ada isn't more popular? 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> From: Markus E Leypold Organization: N/A Date: Sun, 04 Feb 2007 21:18:55 +0100 Message-ID: User-Agent: Some cool user agent (SCUG) Cancel-Lock: sha1:FogSsITySUd35h8QLBD4xTPKkCQ= MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii NNTP-Posting-Host: 88.72.198.57 X-Trace: news.arcor-ip.de 1170620034 88.72.198.57 (4 Feb 2007 21:13:54 +0200) X-Complaints-To: abuse@arcor-ip.de Path: g2news2.google.com!news4.google.com!border1.nntp.dca.giganews.com!nntp.giganews.com!newsfeed00.sul.t-online.de!t-online.de!newsfeed.freenet.de!news.unit0.net!newsfeed.arcor-ip.de!news.arcor-ip.de!not-for-mail Xref: g2news2.google.com comp.lang.ada:8924 Date: 2007-02-04T21:18:55+01:00 List-Id: "Dmitry A. Kazakov" writes: >>>>> What about maintainability and reasoning? >>>> >>>> What about it? It's easy with value-oriented languages (i.e. languages >>>> that just produce new values from old ones in a non-destructive >>>> fashion). Functional languages do this therefore reasoning is a well >>>> developed art there. But the representations of all those values >>>> (trees, lists, ...) (a) rely heavily on representation sharing and (b) >>>> use references because of that. They need and use GC. >> >>> You are mixing by-value vs. by-reference semantics with no-identity vs. >>> has-identity. >> >> No. Values have no "identity". > > It depends. Polymorphic value has an identity. But I understand what you > mean, and that meaning is correct. > >> "Object identity" smacks heavily of >> storage and memory chunks. > > No. Identity is just a function id:X->I, where I is some set of comparable > values. No magic. X'Address or X'Access can serve as an identity function. OK. In the context of your comment "You are mixing by-value vs. by-reference semantics with no-identity vs. has-identity" I had the impression you were talking about the identities of objects. I still do not understand your comment comment then: I'm ceratinly not mixing up anything here. > 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. > 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). > 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. > For all possible answers there exist > corresponding values of A, B, C, C in A, C in B, A/\B etc. > It is a semantic > problem which has nothing to do with representation, be it > immutable-functional or shared. > Identity is a way to express this semantics. ?? Given the context we started at, I'm not sure I understand what you're talking about. > 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. But we were talking about useful implementations of a functional view: There sharing is unavoidable thus GC. (Of course if you don't care for efficiency ...). Regards -- Markus