[r6rs-discuss] [Formal] Allow compilers to
reject obvious violations
per at bothner.com
Mon Feb 26 16:04:04 EST 2007
Arthur A. Gleckler wrote:
> Wouldn't a warning as opposed to an error give you the help from the
> compiler that you want without forcing me to do the extra work that I
> want to avoid?
It's a quality-of-implementation issue. Ideally, I'd like to be able
to control warnings (including at specific points in the program), and
also control whether warnings-are-errors.
In the normal case I believe that extensive compiler checks and
warnings-are-errors is the best way to work, so I might be tempted
to make that the default, but others might disagree. What makes most
sense depends on which "market" I'm "targeting".
The problem with just warnings is that it is too easy to ignore
warnings, and then you get more and more warnings as the code
develops, and pretty soon there are so many warnings that you
miss it when a new and unexpected one shows up. It is also a
lot easier to fix a diagnostic as soon as it appears, rather than
fix it "later" - which often becomes "never". That is why
warnings-are-errors makes a lot of sense.
Note that allowing clearly-wrong code to execute with just a warning
may be complicated to implement in some optimizing compilers.
per at bothner.com http://per.bothner.com/
More information about the r6rs-discuss