Xref: utzoo comp.lang.c++:6533 comp.object:962 Path: utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!umich!samsung!cs.utexas.edu!sun-barr!decwrl!megatest!djones From: djones@megatest.UUCP (Dave Jones) Newsgroups: comp.lang.c++,comp.object Subject: Re: Inheritance vs. Composition Message-ID: <12051@goofy.megatest.UUCP> Date: 16 Feb 90 23:39:03 GMT References: <20020@bellcore.bellcore.com> Organization: Megatest Corporation, San Jose, Ca Lines: 38 From article <20020@bellcore.bellcore.com>, by sjs@spectral.ctt.bellcore.com (Stan Switzer): > Dave Jones (djones@megatest.UUCP) writes: >> From article , >> by pcg@rupert.cs.aber.ac.uk (Piercarlo Grandi): >> >> > ... [ to ] map the concepts ultimately onto contiguity or >> > pointers (the only ways we have in a computer to indicate a >> > relationship between data). >> >> That's what this all comes down to isn't it? That and what kind of >> shorthand-resolution you want the compiler to do for you. (Not easy >> questions, actually.) > > I was meaning to comment on this earlier, but I let it pass. There > are many ways to represent relationships in a computer. For instance, > relational databases (conceptually) use an associative technique based > on the equality of attribute values. [...] These other relationship techniques you named are all search-and-test operations. You still need some way to find that something to test. Notice that Mr. Switzer used the word 'ultimately'. These search-and-test operations are indeed ways to indicate relationships, but they *ultimately* depend on contiguity or pointers. Contiguity and pointers are the atomic operations of association in digital computers. Still the question remains as to whether you want the higher level operations to be an integral part of a programing language, as hash-tables are, for example, in AWK, or do you want to furnish these capabilities as {utility/library/class} functions which extend a basic language? My current opinion is that if the language has good enough extention mechanisms, it's best to start with only a small set of primitive operations, and build. That way, you don't tend to get 'languaged into a corner' with this language having this feature and that language having that one, and no way to mix them. (I often wish I could link my C-procedures into an AWK program.) Problem is, I don't know of any language whose extention mechanisms are 'good enough'. But then, I really haven't been keeping up over the last few years. C++ is close, though.