Small poll

James Hague jamesh@REDACTED
Thu Dec 18 00:32:12 CET 2003

Kostis Sagonas wrote:
>  > My gut feeling is that it's a can of worms that's best left closed.
>  > Why warn about this case, but not slightly more complex cases? 
> Sorry to suddently turn this thread into a political one, but the
> above argument seems to me an argument of the form:
>   "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.
Well, okay, you just did, but it's not meaningful :)

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?

I would buy that, yes, it makes sense because "a + 42" is a typical newbie
mistake, and we're probably not talking about a lot of additional code to
warn about this.  But it's also a typical newbie mistake to use an atom in a
function header, like "first({x,y}) -> x", and that can't be warned against.
So it's hit-or-miss about what can be warned about and what can't.  This is
what I meant about a can of worms.  It is more straightforward to dismiss
the issue, rather than going down a long road of adding warnings for all
kinds of things that may or may not be errors, because realistically this is
a minor issue.

Again, this has nothing to do with social injustices.  You don't engineer
laws the same way you engineer software.


More information about the erlang-questions mailing list