From: lasner@watsun.cc.columbia.edu (Charles Lasner)
Subject: Re: The need for an assembler (was: Favorite CPU)
Reply-To: lasner@watsun.cc.columbia.edu (Charles Lasner)
Organization: Columbia University
Date: Thu, 27 Aug 1992 08:15:10 GMT

In article <BtLt4o.45G@rice.edu> swaim@owlnet.rice.edu (Michael Parks Swaim) writes:
>In article <1992Aug26.065533.14600@news.columbia.edu> lasner@watsun.cc.columbia.edu (Charles Lasner) writes:
>>So, in your book, a competent person is someone writing in C, who really
>>hasn't a clue in the "under the hood sense" yet is expected to not make
>>unreasonable amounts of programming errors, while is statistically likely
>>to not comment well, and is also likely responsible for at least their
>>fair share of the errors found in the released code of this world.  I'm glad
>>that they may be other measures of competency :-).
>
>  It depends. If the person's just a bad typist, and can lucidly explain
>what he's doing, and why, then he's I'd call him competent, even if he just
>knew C, and had no idea what his CPU was. Someone who writes code without
>thinking about where he's going is sloppy, and will generate lots of 
>interesting bugs.

That seems to describe a fair segment of existing C programmers apparently.
Not all, but an alarming percentage that isn't insignificent.

>
>>  Indeed, the usual argument given to use
>>C is to *avoid* what assembler offers!
>
>  That's because assembly's generally harder than C.

This is the first time someone used that word.  So, this would imply that
C is to be used as an "easy way out" of getting "something" to work even if
it's not necessarily the "best" thing.  In other words, to advance the art of
mediocrity and expediency and "close enough for government work".

I'm not advocating any form of panacea, just that *some* work is done in a
questionable way, and using C in the process.

 In assembly, you can
>use whatever calling conventions you like, as long as you're consistant.
>With C, I (generally) don't have to worry about calling conventions. While
>this degrades performance, it's one less thing for me to have to think
>about. I consider this a good thing. I also don't have to worry about
>addressing elements in an array larger than 64K on my '386. I can also
>write programs that'll run on the Sparcs at school, which would be really
>difficult in assembler.

I have no problem with this: you made a conscious decision to trade off
something.  There are people on this group that will claim that their use
of C represents no tradeoff whatsoever, and to the contrary are guaranteeing
an improvement.

>
>  On the other hand, any programmer should have SOME idea of why the machine
>works the way it does. Not necissarily being a competent assembly programmer,
>but understanding tradeoffs in the system architecture.

Why bother? When you are ignorant about the existence of tradeoffs, you can
fantasize about how good your program runs :-).

>
>  As an aside, how many people here have programmed in only 5 or less
>languages? I've used at least 10 that come to mind immediately, and I don't
>consider myself that experienced. Most languages involve some sort of
>tradeoff, and I think that people should use whatever language that's both
>available and the programmer feels comfortable with. I don't think that C
>or assembly is the "best" language most of the time.

I have no big problem with the last statement, but apparently many of the
more vocal people on this group will differ with you, as they view C as
both perfectly optimal and a virtual panacea.

cjl