Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP
Path: utzoo!mnetor!seismo!rutgers!mit-eddie!bu-cs!bzs
From: bzs@bu-cs.BU.EDU (Barry Shein)
Newsgroups: comp.lang.misc
Subject: Re: Check the Arg Count
Message-ID: <3330@bu-cs.BU.EDU>
Date: Fri, 9-Jan-87 16:47:40 EST
Article-I.D.: bu-cs.3330
Posted: Fri Jan  9 16:47:40 1987
Date-Received: Sat, 10-Jan-87 01:57:25 EST
Organization: Boston U. Comp. Sci.
Lines: 94


From: sommar@enea.UUCP (Erland Sommarskog)
>Well, I may missunderstand what you mean, but to me it seems that you are
>trying to say that type-checking languages like Pascal, Ada etc are inferior
>to languages that are more relaxed at this point, like C. Also you seem
>to imply that type checking is only for bad programmers. 

Perhaps its semantics. You call it type-checking. I'll call it
type-obsession. When type-checking becomes so strong as to make it
impossible to write a general purpose sort() subroutine or string
handling library then yes, it is type-checking gone mad.

It reminds me of a rather novice programmer I once worked with. Her
previous job was as an assembler programmer on a machine that had no
multiply instruction. She told me the first thing every new programmer
there had to do was write a multiply subroutine for themselves.

Think about it, every piece of software coming out of that company
had a different multiply routine packaged in it. I don't see things
as much different in the Pascal world. Software just isn't re-useable.

>Actually, I can't escape the feeling that the people who advocates 
>relaxed checks are those who are bad at good design. The more of tricks you put
>into it, the harder to understand it is. A good programmer don't feel
>restricted by a checking compiler, he feels supported.

Do you think writing a sort routine or string package once and reusing
it a 'trick'?  How about a math library?

>Finally, one note a bout Pascal since you mention this language. As we all
>know, Pascal was never ment for "productive" programming, just for
>education. On the other hand, the most compilers do offer extentions
>for separate compilation, string handling etc. Of course these extentions
>doesn't make Pascal very portable. By the way, as far as I know the most
>of TeX is written in standard Pascal, but you perhaps would call that
>useless software?

First, I think it was a mistake using a non-productive language (to
use your phrase) for education. The leap from beginner to a person
with certain views about the programming milieu happens far too fast
to allow it to happen in such an artificial environment. The damage is
obvious, we have people wandering the streets trying to do useful work
in Pascal because that's what they were taught.

The notion of extensions just makes it worse. It convinces the student
that the computer field is a random collection of unintelligible hacks
as textbooks don't match the language at hand nor manuals etc. Have you
ever tried to explain to a student why the example he or she typed in
from their textbook won't work without a major rewrite at the language
level (bad enough if there's some O/S interface, but at the language
level?) I have, they look at you like you're a snake oil salesman and
I don't blame em.

As to TeX, I know, it seems to be the only program ever written in
standard pascal so everyone points it out when these things come up:

	1. It's not really written in Pascal, it's written in WEB,
	Pascal is it's assembly language. In the same sense that
	a good HLL can make the fact that it's assembly language
	is assembly language fairly transparent, so can WEB. I mean,
	I can probably manage to write a compiler to turn my favorite
	HLL into Pascal if I had to, would that mean my programs were
	really in Pascal? Is Pascal really machine language because
	that's what it's translated to?

	2. Have you ever actually looked at TeX, or better, tried to change
	something in the TeX source code? Try it, if you don't get sick
	you have a far stronger constitution than I do.

	3. TeX is utterly standalone on purpose so it obviates any
	need for standard subroutine packages. Of course, the whole
	change file facility that had to be implemented leaves one only
	wondering about whether there was a rather large fundamental
	problem remaining to be solved.

	4. In fact, the model of TeX is so simple it could be written
	in most any language. It takes an input stream of characters,
	classifies them (possibly into tokens) and transforms them into
	an output stream. I am not saying the details of this are simple,
	but I am saying that to do so it's not surprising that any language
	with a few simple operators was powerful enough for the job. It
	also has no need for any external standards (for example, a standard
	math package) as it defines its own standards. The only interface
	with the outside world it has is that it is able to read streams
	of chars and transform them to other streams of 'chars' (actually,
	a dvi file, but similar enough it's not worth beleaguring that point.)
	Of course, it has to be able to open files by name but then again
	that's exactly the part that has to be redone every time TeX is
	'ported', it's a moot point.

If you think TeX is the shape of the future of software engineering
than god help us all...

		-Barry Shein, Boston University