From: lowen@lorc.UUCP (Lamar Owen)
Newsgroups: alt.folklore.computers,comp.unix.misc
Subject: Re: The need for an assembler (was: Favorite CPU)
Date: Wed, 19 Aug 92 09:37:34 EDT
Organization: LORC Enterprises

lasner@watsun.cc.columbia.edu (Charles Lasner) writes:

> I offered an open challenge for someone to quantify how many bugs they might
> attribute to various language-based implementations of any code released by
> any author on any basis, to rate the use of the various languages as that
> pertains to reliability of product.  I don't see anyone challenging my
> opinion that C would come in dead last.  I would think that writing buggy
> code in C qualifies at least in part as not knowing what goes on under
> the hood so to speak.  Presumably all of these "experts" you claim exist 
> (aren't they "experts" since they aren't as ignorant as I make out?) had
> full access to all of the associated wonderful development tools to 
> eliminate all known problems, etc., so if so, then why the failing grade?

The only problem with you challenge is that there is no way to quantify in
the way that you want quantified.  I could tell you of my bugs, but that
wouldn't state anything.  You know, though, there is a very good reason why
C would come in dead last in such a poll: C is simply the most popular 
language around at this time, and thus, since more program in C, there MUST
be more bugs in C programs.

I have found, from multi-lingual experience, that, no matter what languag I
program in, I will end up making approximately the same percentage of bugs.
Let me qualify that: if I write a 10,000 line assembler program, and then I
write a 1,000 line C progam, and then I write a 6,500 line BASIC program, I
have found that, most of the time, my bug percentage will remain constant,
all other variables equal (fatigue level, health, biorythms, etc.)

Note that my first language is Z80 assembler.  My second language is BASIC.
I have since learned Pascal, C, various scripting/batch control langauges,
and a little FORTRAN (a little was all I could stand, since, by then, I
was used to the free-form style of C).  Note also that I have written many
thousands of lines of Z80 code, including an operating system, a novel Z80
disassembler (novel in that it was exceedingly small (1.25K for the actual
disassembly module) that could easily be extended to other instruction
sets (and was extended to handle the Z280), and various system utilities, all
for the TRS-80 model 4 under LS-DOS.

In fact, I have, over the past 11 years of writing asm code, grown accustomed
to the language.  However, I find C more readable, more writeable, and *better*
for almost everything I used to do in asm.  And, C can be portable, whereas
Z80 asm is a dead end.  And I'm a Z80 bigot saying that!

In fact, I view C as a portable assembler.  If I want to do higher level stuff
for mundane tasks, my language of choice is (gasp! horror!) BASIC, due to it's
exceeding simplicity, outstanding readability in the structured versions, and
wonderful string-handling capabilities that are easy to code correctly the
first time.

To put it bluntly, very few langauges handle strings as elegantly as BASIC
does. (Snobol, in particular, handles them better, but I don't have a Snobol
system).  Handling strings in Z80 asm is not too bad, thanks to the designers'
giving it a wonderful block move/compare instruction group, but it still is
not the best for simple string ops (such as insertions, deletions, general
string extraction, et al.).  Note that I am excluding awk and perl from this
up to now, even though they are excellent text processing languages.  

> I have friends who are of the opinion that C is more like a demented
> macro assembler being misused with the "wrong" macroes, but I won't let
> my personal friends bias the count here.

Everybody has their own ideas of what's Right and what's Wrong in terms of
languages.  Your friends can think and do as they wish.  I will continue to
do as I wish. ('do' in this case, has the implied meaning of 'program/code
in X language').  I like asm, I like C, I even like BASIC.  So?  I simply
like to program--the particular means of expression are irrelevant: the artful
result is.  However, just like any fresco artist would not use oils to paint
ceilings, canvas artists would not fresco their canvas.

> cjl

--

Lamar Owen, Systems Consultant, GE Lighting Systems, Hendersonville, NC
***********************************************************************
 Opinions expressed herein are the author's and do not reflect policy
   or opinions of the General Electric Company or its subsidiaries.
***********************************************************************