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!bonnie!akgua!mcnc!decvax!mit-athena!jc From: jc@mit-athena.ARPA (John Chambers) Newsgroups: net.lang Subject: High-levelity Message-ID: <83@mit-athena.ARPA> Date: Wed, 26-Dec-84 11:08:50 EST Article-I.D.: mit-athe.83 Posted: Wed Dec 26 11:08:50 1984 Date-Received: Sat, 29-Dec-84 01:54:19 EST Organization: MIT, Project Athena, Cambridge, Ma. Lines: 61 > ... (really, now, is C much higher level than assembly language?). (No, but it's a higher-level language than most of its competitors. :-) Come now, what does it mean to say that language X is "higher-level" than language Y? We could start a very long debate on this subject. (Hint, hint....) I'll throw out a definition for consideration, flaming, etc. I will call X "higher-level" than Y if it is generally possible to express concepts (data structures, operations, flow of control, etc.) in fewer symbols in X than in Y. The definition of "lower-level" is left to the reader. Note that by this definition only supplies a partial ordering. Two languages may be so different that, depending on your application, either may require the smaller number of symbols. I also won't listen to pickiness. If most examples differ by only 50%, I will consider them to be the same level. Some pairings, like APL and Prolog, are simply incommensurable. This definition sounds intuitively like a useful one, but it sometime has results that partisans of various languages might find surprising. For example, Cobol is lower than assembly language. PL/I and Ada tie with assembly language. Pascal, Fortran and Basic are close, and barely above assembly language. C comes out somewhat better, beating assembly language by about a factor of two. Lisp, not surprisingly, comes out a bit higher, around 3 or 4. APL, Snobol4, Forth, and Prolog and Smalltalk come out much higher (around 10-20 for certain application areas, but only in the hands of a programmer that understands them.) A related observation is that the time it takes me to make a chunk of code work right is basically limited by how much I can see on a screen at once. (Yeah, I know about paper; it's about 2 orders of magnitude slower. Ever try running grep on a listing?) Most terminals in the real world are 80x24 or so; this is the practical limit to what I can work on at once. When I get ahold of some of Martillo's nice terminals (not hard, he's right next door, and I know where the master key is.:-), I'll be able to work on bigger functions. But anyhow, the amount of code it takes to express a concept is important. The fewer symbols, the more I can work on at once in my 2Kbyte window. I find it interesting and amusing that C, intended originally as a sort of "structured assembly language" is able to express many concepts in fewer symbols than its supposedly "high-level" competitors. It's also interesting and amusing that designing a language for ease of expressing low-level "hardware" concepts such as pointers, absolute addresses, etc., resulted in a language that is more portable than languages that were intended to be portable (but rarely live up to the advertising very well). I suspect that it's not a fluke. I think language designers should spend less time flaming about the defects of C (which are many), and spend more time looking at what makes this language better than most of its competitors for writing the code it was designed for - operating systems, low-level drivers, etc. Maybe eventually we might have a really high-level language that does what C does, but does it a lot better. Does anyone have another good (or at least interesting :-) definition of high-level? After all, people have been bandying the term about for years; it's about time we had a definition so we could really tell which languages are the advanced ones and which are just pretenders. John Chambers (Project Athena @ MIT)