Newsgroups: comp.lang.misc Path: utzoo!utgpu!news-server.csri.toronto.edu!rpi!uupsi!ficc!peter From: peter@ficc.ferranti.com (Peter da Silva) Subject: Re: Formal definitions (Re: ada-c++ productivity) Message-ID: <-WRADPH@xds13.ferranti.com> Reply-To: peter@ficc.ferranti.com (Peter da Silva) Organization: Xenix Support, FICC References: <1954@optima.cs.arizona.edu> <1991Apr16.130341.27345@kodak.kodak.com> Date: Tue, 16 Apr 91 19:19:16 GMT Taking a quick flip-flop, here: In article <1991Apr16.130341.27345@kodak.kodak.com> cok@islsun.Kodak.COM (David Cok) writes: > [a specification language] says nothing about the method used > to achieve that. Indeed there are many methods (algorithms) for sorting. > Some of them are quite complex in order to achieve some desired level of > performance. Different ones will be applicable in different situations. Yes, and you need to specify a bit about the behaviour of the sort: does it retain the order of non-sorted fields, for example? In any case, how does this differ from top-down programming, where you say: sort frammistan and later on fill in sort with code (or pull an appropriate routine from a library). I have no idea how the UNIX 'sort' program works... does that make the following shell script a formal pecification? awk -F: '{print $1}' /etc/passwd | sort | uniq -c In fact I know nothing about what algorithms are used by uniq, sort, or awk. A great advantage of higher level languages is that you no longer have to deal with the implementation details of larger and larger components of the solution. -- Peter da Silva. `-_-' peter@ferranti.com +1 713 274 5180. 'U` "Have you hugged your wolf today?"