Newsgroups: news.software.b
Path: utzoo!henry
From: henry@zoo.toronto.edu (Henry Spencer)
Subject: Re: C-news on DECsystem 5810 under Ultrix 3.1C
Message-ID: <1991Mar17.080147.24798@zoo.toronto.edu>
Date: Sun, 17 Mar 1991 08:01:47 GMT
References: <1991Mar13.123949.5826@cs.utk.edu> <1991Mar13.162056.19587@zoo.toronto.edu> <1991Mar15.124555.10361@cs.utk.edu>
Organization: U of Toronto Zoology

In article <1991Mar15.124555.10361@cs.utk.edu> Dave Sill <de5@ornl.gov> writes:
>Even though I read the problems file, and even that section, I made no
>connection between the problem described and my symptom...

There is a well-known principle, which I would have hoped everyone would be
aware of, that really cryptic "something went badly wrong here" complaints
from compilers are often delayed a few lines, especially if those few
lines are mostly things like closing braces.  If your compiler dies in
agony, blindly looking only at the line *it* thinks caused the problem
is just not enough.  By definition, it is confused.

At some point, there will be a "Troubleshooting Guide", which probably
should include a "Novice's Guide To Compiler Problems" section.  Note
that it won't happen soon unless somebody else gets interested in writing
it, because we think our scarce time is better spent right now on the code.

>...  Perhaps if the "Values
>of Logical Operators" section included the above error message I would
>have caught it.

And what if DEC changes the format of the message next time?  Pinning
down compiler errors inherently requires thought; we don't think it is
our job to try to provide cookbook solutions for every problem, especially
when it means tracking vendor brain-damage in detail.

>But this begs a larger question:  If you knew that some systems bombed
>on the line, why didn't you just change it...
>Is this just a stubborn refusal to "clutter" your code at the expense
>of those who have to make it work?  If it is, I think you've made a
>terrible mistake.

No, it is a stubborn refusal to try to program around the brain damage
of every broken compiler in existence.  In this case, the effort is
relatively minor and we might get around to it, although we don't class
it as urgent and we have a lot to do.  However...

In general, trying to program in lowest-common-denominator C is like
programming in BASIC.  Refusing to do this is not a "terrible mistake",
it is a practical necessity.  We have more important things to spend our
time on.  The vast majority of "those who have to make it work" do *not*
have this particular bug.  We think our time is best spent on work
that will benefit everybody, and there is a lot of that.

Don't forget to complain to your compiler supplier.
-- 
"But this *is* the simplified version   | Henry Spencer @ U of Toronto Zoology
for the general public."     -S. Harris |  henry@zoo.toronto.edu  utzoo!henry
