Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP
Posting-Version: version B 2.10.2 9/18/84; site gumby.UUCP
Path: utzoo!watmath!clyde!burl!ulysses!allegra!mit-eddie!genrad!teddy!panda!talcott!harvard!seismo!uwvax!gumby!g-frank
From: g-frank@gumby.UUCP
Newsgroups: net.lang
Subject: Re: levelheight
Message-ID: <247@gumby.UUCP>
Date: Wed, 9-Jan-85 15:44:51 EST
Article-I.D.: gumby.247
Posted: Wed Jan  9 15:44:51 1985
Date-Received: Sat, 12-Jan-85 00:36:58 EST
References: <2673@dartvax.UUCP> <4890@utzoo.UUCP>
Organization: U of Wisconsin CS Dept
Lines: 106

> Okay, barring the ``apples and oranges'' types of questions, I think
> I can come up with a working definition of ``high level''. The
> ``highness of level'' is a measure of how little you have to think
> about something other than the problem you want to solve. 
> 

I like this definition a lot.

> 
> The interesting thing is that C does not score poorly on this. Arguments
> such as ``well the ++ instruction was clearly designed for the pdp11,
> therefore C is low level'' do not wash -- once you have used C a fair
> bit, typing i++ is as natural (and unthought) as typing i + 1.
> 

I don't think that is a common argument against the high-levelness of C
A better one is that the lack of implicit pass by reference causes pointers
to be used in a way which doesn't have anything to do with the problem you
want to solve.  You want to say, "this variable is changed by the routine
I'm calling," and instead your program reads like R2D2's diary.

Another argument is that, in C, you must remember that things you
declare sometimes aren't what you think.  An array isn't an array, it's
a pointer to allocated storage, so you don't have to put a & in front of
it when passing it to a function.  But remember, the function doesn't
know its dimensions or its size, no matter how you declare it to the function,
so you have to define a manifest, or something.  And remember, if you cast
it, you have to treat its original type as a pointer type, and . . . oh,
forget it.

> 
> 1.	Line numbers and GOTOs make for a low level language. If I
> 	have to think about ``is it goto 100 or goto 110'' then I am
> 	wasting valuable thinking time on crud.
> 

Line numbers make for a low level language.  Go to's, when used in place
of looping constructs, and when used irrationally and in excess, make for
a low level program, even when written in a high level language.  On the
other hand, a lack of some sort of escape to a semantically meaningful
label (e.g., error_exit, try_again, etc.), can make programs less like
what we intended to do, as we desperately seek expedients to escape multiple
nested loops.

Mind you, I think "exceptions," as in Ada, are the highest level of all.
One may somewhat sophistically argue that gotos, when used only to implement
some kind of exception by the programmer, make a language higher level than
one that does not have them, all things being the same otherwise.

> 2.	all high level languages have a variety of types, including
> 	a string type.
> 
> 3.	all high level languages have a way of defining types and
> 	let you use them conveniently.
> 

Yup.  But does Lisp qualify for number 3?  How about Prolog?  (This is
not a rhetorical denial.  I'm curious how you feel about this.)

> 4.	all high level languages have a way of ``hiding'' information.
> 	Here I am thinking of procedures and functions, but this can
> 	include modules as well.
> 

And not just hiding, but making less susceptible of meddling, and of making
sure that invocations or uses of the encapsulation mechanism match its
definition.  In other words, unchecked and sloppy use of pointers, a lack
of array bounds checking, and no ability to check the number and type of
parameters to function calls all violate this one, in spirit at least.
(Don't tell me about lint.  YOU try to find it for anything but an ortho-
dox Unix system).


> Can anybody come up with any other heuristics? So far, my favourite
> of the ``block structured'' types of languages is Algol 68 -- though
> I am  told that Simula is rather nice as well.
> 

Modula-2, if you don't mind doing without gotos, and the complete lack
of a standard for library modules isn't too galling for words.  Ada, if
you don't mind doing without a compiler.

> For sheer joy of writing code I would rather be writing in Lisp, but
> I don't think that Lisp is ``higher level'' than Algol: I just have
> a severe case of Hofstadter's disease (all the world is recursive,
> and hence wonderful) which I am entirely uninterested in curing...
> 
> Laura Creighton
> utzoo!laura

I think you have the right idea.  What's really needed is a debate on
two opposing viewpoints:

  "A high level language is fun."

  "A high level language is beautiful, but not fun, because while
   giving greater expressivity, it also imposes discipline, which
   humans find inconvenient."  (The European view, I think).

But do you really enjoy writing code?


-- 
      Dan Frank

	"good news is just life's way of keeping you off balance."