Thu Dec 18 00:52:45 CET 2003
James Hague wrote:
> > "Why try to eliminate some social injustices, since we are never
> > going to eliminate them all (especially the most subtle ones)."
> > Just think about it...
> First, you can't compare software and social injustices. You just can't.
First of all, I am not comparing them with "software" but with
"software errors". To me, the analogy is a very good one.
In the same way that we cannot eliminate all social injustices,
we cannot eliminate all software errors. However, trying to is
a worthwhile cause, and achieving partial success is probably
better than doing nothing about it. The analogy is even better
if you take into account that most often than not, there is no
unanimous agreement about what really constitutes an injustice
or an error.
> Second, software is a battle against complexity. In this particular case
> you're adding a check and a warning about something that's (A) a rare
> occurrence, (B) going to bomb out immediately the first time you test the
> function, and (C) detected at compile time in specific circumstances and not
> detected in others. To provide a warning for this, you are adding
> additional code to the compiler. Is it worth it?
You are obviously not a compiler writer, are you? In this particular
case, we are actually talking about *eliminating* (in the case of the
BEAM compiler) and *avoiding adding* (in the case of HiPE) lots of
stupid code that is now special-handling the case of "a+42" (and
generating instructions with very weird argument types). If you
do not believe me, just look at the sources.
More information about the erlang-questions