Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Posting-Version: version B 2.10.1 6/24/83; site mit-athena.ARPA Path: utzoo!watmath!clyde!burl!ulysses!allegra!mit-eddie!genrad!decvax!mit-athena!jc From: jc@mit-athena.ARPA (John Chambers) Newsgroups: net.lang Subject: Re: High-levelity Message-ID: <10@mit-athena.ARPA> Date: Fri, 4-Jan-85 15:17:10 EST Article-I.D.: mit-athe.10 Posted: Fri Jan 4 15:17:10 1985 Date-Received: Sun, 6-Jan-85 01:15:10 EST References: <1242@bbncca.ARPA> Organization: MIT, Project Athena, Cambridge, Ma. Lines: 87 > The degree of high-levelness of a language X for a problem Y is > defined as the size of the biggest subset of a set of programmers > who come up with the same solution, divided by the size of the > base set. > > Jack Jansen, {seismo|philabs|decvax}!mcvax!vu44!jack This is one of the more enticing suggestions I've seen so far. But it needs a little work, as there is one important qualification to this approach. There are some problems that have more than one real solution. A classical mathematical example is the high-school textbook proofs that the base angles of an isosceles triangle are equal. There are two equally "fundamental" but different proofs. One starts with dropping a perpendicular from the apex to the opposite side, and proving that the two resulting triangles are isomorphic (and right). The other consists of showing that the original triangle is isomorphic with its mirror image. Both proofs end up with the angles in question being the corresponding angles of isomorphic triangles, but two very different triangles are used. This would be considered by most mathematicians not a sign of the weakness of Euclidean geometry, but rather of the power of the notation used to express it. Both proofs are simple and elegant; they are not variants of a single underlying proof. The language can handle both with equal ease. Similarly, in the world of programming, we have examples like sorting. Suppose your programmers were asked to write a routine to sort a list (or array) in memory (or other random-access storage). Given no other constraints (such as knowing how the data is likely to be ordered before the sort is started), there are several algorithms that are fundamentally different from each other. Two of the best known are "quicksort" and "bubblesort". They are both very simple, and do their work in very different ways. There is no way of saying which is "best". If the list is short or starts out close to sorted, the bubblesort is better. For a large random list, bubblesort is atrociously slow, and quicksort is about the best known. A language that is "high-level" for sorting would express both elegantly. (It might also have an elegant way of expressing the best and worst cases for each.) I think that this definition does have its appeal. Most of the extant sort algorithms can be expressed succinctly in some languages, and not in others. Thus, quicksort can be expressed simply and elegantly only in languages that support recursion. Without recursive functions, you have to fake the recursion with a visible stack. The code to do the stack manipulations swamps the code for the elegant sort algorithm, making a messy routine which is difficult to comprehend without much study. On the other hand, bubblesort is somewhat awkward (though not very much so) in a language that has only recursive functions and no explicit looping function. A language that has the power to express known sort algorithms probably is required to have both recursion and a simple looping construct. Sorting is a good example for another reason: A "practical" implementation of a sort algorithm is only possible if the language allows a comparison test routine to be provided as a parameter. This immediately excludes most current programming languages (except for Lisp, C, Forth, Prolog, Snobol4, and a few others). Note that this is easy to express in most assembly languages (though the sort algorithms are not). I might also point out that there are several non-equivalent ways to invert a matrix. Can your language express all of them elegantly? If not, it's not a "high-level mathematical" language. By the way, I find myself trying to type "high-levility" rather than "high-levelity"; I notice that others say "high-levelness". Do we have any votes for "high-levelhood"? > Some other definitions: > > 1. X is "higher-level" than Y if it has fewer detractors among professors > of computer science. > > 2. X is "higher-level" than Y if fewer people believe it should be > stamped out. > > 3. X is "higher-level" than Y if it was invented as a substitute for Y. Great! I love all of them! (Except that #3 has an obvious exception: Basic was invented as a substitute for Fortran, Algol, and all those other academic playthings. Surely you don't mean to suggest that Basic is a high-level language!? :-) John Chambers