Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!uunet!igor!yoda!jls From: jls@yoda.Rational.COM (Jim Showalter) Newsgroups: comp.software-eng Subject: Re: Reusability considered harmful??(!!) Message-ID: Date: 23 Feb 91 21:48:58 GMT References: <88431@tut.cis.ohio-state.edu> <6108@stpstn.UUCP> <87829@tut.cis.ohio-state.edu> <6248@stpstn.UUCP> <1991Feb11.103100.112@skyler.mavd.honeywell.com> <34464@athertn.Atherton.COM> <88744@tut.cis.ohio-state.edu> Sender: news@Rational.COM Lines: 41 >What ordering is used by a sort routine, for example, certainly >belongs in the specification (or should be a parameter to it). It's >not clear why you inherently need source code for the sorting >algorithm to determine this. Indeed, not only do you not need source code for this, in Ada this would be done by providing a generic sort routine to which you could supply your own "<" operation (lexicographic or whatever you prefer). In addition, this parameter could be defaulted to the most likely to be used "<". >Now you're getting into a serious problem. Inheritance (of code, at >least, which is what you get in most OO languages) causes major >technical problems in terms of certifying correctness, either by >formal verification or by testing. Substantiate this: I see no reason why this need be true. >Code inheritance is inherently a >"white box" phenomenon... I'm even more perplexed by this statement. One of Stroustrup's objectives in designing C++ was to be able to supply BINARY inheritance trees to which others could add their own inherited code later on. Clearly this not only does not require white-box visibility, it specifically PROHIBITS it, by design (it makes it easy to supply code without a source license that is still extensible by end users). > you'd better have source code for the >inherited component if you expect to use code inheritance for much >more than name overloading (and you don't really need inheritance for >this anyway). Again, this makes no sense to me. And I find this particularly vexing because I'm NOT a big fan of inheritance, so I usually find myself on the OTHER side of such arguments. But these statements just don't track with my own experience using (at gunpoint, I'd like to add...) C++ and its inheritance capabilities. -- ***** DISCLAIMER: The opinions expressed herein are my own. Duh. Like you'd ever be able to find a company (or, for that matter, very many people) with opinions like mine. -- "When I want your opinion, I'll beat it out of you." Brought to you by Super Global Mega Corp .com