Path: utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!cs.utexas.edu!rutgers!cmcl2!lanl!opus!ted From: ted@nmsu.edu (Ted Dunning) Newsgroups: comp.sw.components Subject: Re: Assignment in Ada Message-ID:Date: 26 Sep 89 05:07:52 GMT References: <6564@hubcap.clemson.edu> Sender: news@nmsu.edu Organization: NMSU Computer Science Lines: 76 In-reply-to: billwolf%hazel.cs.clemson.edu@hubcap.clemson.edu's message of 24 Sep 89 18:04:53 GMT In article <6564@hubcap.clemson.edu> billwolf%hazel.cs.clemson.edu@hubcap.clemson.edu (William Thomas Wolfe, 2847 ) writes: > now what is the relation of parameter passing by value (i.e. > initializing) on the reference counts in a reference counting adt? The answer is that in general, there IS no "parameter passing by value"!!!!! From the Ada 83 reference manual, 6.2.7: [ ada-noise deleted ] Thou shalt assume nothing else about the passing of parameters. one of the problems is that an in parameter is still a reference which must be accounted for. since there is no mechanism to handle initialization distinct from assignment, it is difficult to write a robust reference counting collection mechanism. another serious problem is that if in-out parameters are implemented as copy-in/copy-out (which is legal), then the copy-out operation is the same as a bit-wise assignment, whereas it should be overloaded with whatever assignment semantics are appropriate for the collectable type. [ please don't read the following embarassingly ad hominem riposte ] mister wolfe in the process of villifying people for having proved their refined sensibilities by falling asleep while listening to adaists has in fact shown that he has not himself investigated the strengths of other approaches. or that perhaps he could not appreciate the purpose of constructs without having the point driven home with a hammer (or ada reference manual). > [...] pre-processors don't exist either and extension are outlawed? Actually, preprocessors do exist; I believe the Classic Ada product (which provides inheritance and dynamic binding to the Ada O-O types) works via preprocessing. However, they must be kept separate from any validated compiler system. and thus will never be standardized or recognized by the ada community at large? (i.e. those who believe true ada is gospel). or will the situation become one of various developers (re)inventing various language constructs and using ada as a particularly odious target language for their latest compiler? > well why didn't we just use lisp to implement our adt's? No concept of data typing, perhaps? hmmmm..... seems to me that mister wolfe hasn't done much lisp programming if he thinks that lisp has no concept of data typing. perhaps he should read CLtL a bit. particularly chapter 2 (data types), chapter 4 (type specifiers), section 6.2 (data type predicates), chapter 9 (declarations), as well as chapters 12, 13, 14, 15, 16, 17, 18 and 19 which describe the builtin data types and type extension methods available to the common lisp programmer. of course, since mister wolfe is so wonderfully omniscient, he will know that CLtl is the commonly used abbreviation for Common Lisp, the Language by guy steele. he should also consider the reasonable assertion that ml is in fact a dialect of lisp. where does acceptance of this put his insistence that lisp has no concept of data typing. in comparison, ada's concepts of typing are very feeble indeed. -- ted@nmsu.edu remember, when extensions and subsets are outlawed, only outlaws will have extensions or subsets