Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!utgpu!water!watmath!clyde!rutgers!sri-spam!ames!ptsfa!ihnp4!inuxc!iuvax!bsu-cs!neubauer From: neubauer@bsu-cs.UUCP Newsgroups: comp.edu Subject: Re: readable [was: first] languages Message-ID: <1039@bsu-cs.UUCP> Date: Sat, 22-Aug-87 19:10:16 EDT Article-I.D.: bsu-cs.1039 Posted: Sat Aug 22 19:10:16 1987 Date-Received: Sun, 23-Aug-87 18:36:20 EDT References: <405@ndsuvax.UUCP> <1010@argus.UUCP> <290@rruxa.UUCP> Organization: CS Dept, Ball St U, Muncie, Indiana Lines: 55 Summary: some are more equal than others In article <290@rruxa.UUCP>, gwl@rruxa.UUCP (George W. Leach) writes: > In article <1010@argus.UUCP>, ken@argus.UUCP writes: > > from the beginning to be a readable language, unlike C and Lisp. > > I wasn't aware that it was the language that dictated readability. > Silly me. I guess it is beyond the control of the programmer to ensure > readability, no matter which language the program is implemented in. A programmer who is concerned with readability can write readably no matter what language is being used. On the other hand, a programmer who is not concerned with readability can (and is likely to) produce utterly incomprehensible garbage. However, that is not the point in question here, we are talking about STUDENT programmers in their first CS course. These are people who usually have never thought about _reading_ programs. The typical view among CS1 student programmers (at least around here, but I would be surprised if we were unique) seems to be "if it runs, it's done." Documentation, intrinsic or add-on, comes as an afterthought, if at all. These are people who need every possible encouragement to write programs that can be read. A "good" language can make it EASIER to write readably, and so helps make it (a little) less difficult to get students to do so. Sure, it is still possible for students to give all their variables names like X, Y and Z or Tom, Dick and Harry. It is also possible to write Pascal in all caps and in a format that is as devoid of structural information as the (typical) FORTRAN or BASIC format (and I'll bet that I'm not the only one who has seen it done). However, some languages have devices that can easily be used to improve their readability. Some, like free format or the ability to use mixed case, are typograpical (and I had better not let myself get started on why typography is not "mere"). Others, like longer identifiers, are aids to memory. Still others facilitate abstraction of concepts from the problem, helping the student to see the forest despite the trees. Astute readers will have noticed that none of the features that I have mentioned here as promoting readability have any bearing on eliminating either C or LISP from consideration as a first language. Both of these languages do have most of the features that tend to promote readability. The perceived readability problems with C and Lisp have little to do with the expressive powers of those languages, but much more to do with the "literary traditions" of the communities that have done most of the programming in them. (I could flame on this topic forever, so I had better not start.) Actually, the reason that *I* would tend to favor Pascal over either C or LISP as a first language (in spite of its screwy use of semicolons) has more to do with its size (not too large) and its reasonably good type checking. I am not impressed by the counterargument that Pascal is not what they will be using "in the real world". After all, a first language is exactly that -- a first language. CS majors are going to have to learn more anyway, and while there are some conceptual leaps in going to a purely declarative or functional language, they should have little trouble with any languages that are as similar to Pascal as C or COBOL. (So there! I can count on getting flames for that! :-) -- Paul Neubauer UUCP: {ihnp4,seismo}!{iuvax,pur-ee}!bsu-cs!neubauer