Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP
Path: utzoo!mnetor!seismo!mcvax!enea!sommar
From: sommar@enea.UUCP (Erland Sommarskog)
Newsgroups: comp.lang.misc
Subject: Re: Check the Arg Count
Message-ID: <1635@enea.UUCP>
Date: Wed, 7-Jan-87 17:55:24 EST
Article-I.D.: enea.1635
Posted: Wed Jan  7 17:55:24 1987
Date-Received: Thu, 8-Jan-87 02:43:18 EST
References: <3226@bu-cs.BU.EDU>
Reply-To: sommar@enea.UUCP (Erland Sommarskog)
Organization: ENEA DATA Svenska AB, Sweden
Lines: 53

In article <3226@bu-cs.BU.EDU> bzs@bu-cs.BU.EDU (Barry Shein) writes:
>Why do I drag all this in? Because I am utterly convinced that this
>entire mindset of forcing the user to be what s/he isn't (careful,
>conscientous etc) is an utter failure. You want a good program? Hire
>a good programmer. You want to become a good programmer? Ya gotta
>work at it. Sorry, ain't no short cuts.
>
>The solution is not to put more restrictions in programming languages
>in an attempt to control the incompetent at the expense of the
>competent. The solution is to teach good design. Design involves
>choices and rules, not removing all the sharp knives from the woodshop
>for fear that some turkey will come in and cut him/herself.
>
>Unfortunately, Pascal makes a false promise it has never been able to
>keep. In fact, it and its successors (at least as of this date) have
>been by and large a failure in practice. Very little code of any use
>has ever been written in them. This is due to the very poor design
>inherent in these. It is not surprising they appeal to those who
>discount careful design and effort as being the ultimate goal. In
>short, the "emperor" has no clothes.

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. 

I happen to consider myself as quite a good programmer, and I think
checking of all possible kinds is compulsary. The more the compiler checks 
for me the less errors I have to search for when I test. As I said my program-
mings skills are good - still my own opinion - but unfortunately I make a
lot of carless mistakes. Take this example: (in Pascal)
PROCERDURE Modify(a : integer);
   a := 2*a;
END;
The compiler will accept this, but of course it won't work since I forgot
the "var". In Ada this is not possible. If I don't write anything "a" will
a in-parameter. In-parameters are constants in Ada so the compiler will
not allow me to modify it. If I make "a" an out-parameter, I can't read
from it. The only possible way is in-out.

Or do you think that I'm bad at design just because I make these mistakes?
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.

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?