Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP
Posting-Version: version B 2.10.1 6/24/83; site umcp-cs.UUCP
Path: utzoo!watmath!clyde!burl!ulysses!allegra!mit-eddie!genrad!teddy!panda!talcott!harvard!seismo!umcp-cs!mangoe
From: mangoe@umcp-cs.UUCP (Charley Wingate)
Newsgroups: net.lang
Subject: Re: High-levelity
Message-ID: <2377@umcp-cs.UUCP>
Date: Wed, 9-Jan-85 16:33:55 EST
Article-I.D.: umcp-cs.2377
Posted: Wed Jan  9 16:33:55 1985
Date-Received: Fri, 11-Jan-85 23:25:47 EST
References: <1242@bbncca.ARPA>
Distribution: net
Organization: U of Maryland, Computer Science Dept., College Park, MD
Lines: 42
Summary: Here's my vote for expressionism

I like the notion that "Higher level languages express higher level
constructs better", and I think the following operational measures allow
some sort of comparison.  Consider first what most people would agree is
the very lowest level sort of language: the machine language of an 8-bit
processor.  ANY construct has to be provided by the programmer.  When one
progresses to, say, Fortran, one finds that a large number of constructs are
now provided; the programmer no longer has to construct them for every
instance.

  I therefore propose the following operational test:

      Language A is "higher-level" than Language B if, on the average,
      the number of machine instructions executed per "unit" of language A
      is greater than the same measure for language B.

For the purposes of distinguishing "terseness" from "expression", I choose to
define "unit" as tokens that actually do something.  Begin-End constructs
don't count, for instance.  One can normalize these comparisons further by
doing all the comparisons on the basis of 8-bit processor instructions; this 
will allow us to compare different assembly languages as well as making the
notion of language level independent of the processor.

One can readily see that (for instance) 32016 assembly language is higher
level than z-80 assembly.  Fortran is higher level than either, but not by
much.  APL and PROLOG are MUCH higher level; of the two, Prolog is probably
higher level.  Lisp is intermediate.  Note that for specialized languages,
it makes sense to make the comparison on the basis of the type of tasks the
language is designed for; it makes little sense to try to compare APL with
SNOBOL, for instance.

I'm not sure this means anything, in the long run.  A number of languages
(PL/M and FORTH, for example) are deliberately low level.  To use "level" as
a measure of merit is to misunderstand the purposes of the higher level
languages.  Languages like APL, SNOBOL, and Prolog are very high level
because the constructs used are well known, and thus the compiler/interpreter
overhead of translation is acceptable.  In comparison, by this measure 
languages like PL/I and Pascal are not especially high level.  Almost any
common data structure has to be constructed by the user.  It is evident
(to me anyway) that people are therefore ranking languages on some other
basis.

Charley Wingate    umcp-cs!mangoe