logoalt Hacker News

Zambytelast Saturday at 9:06 PM2 repliesview on HN

> and I really don't like how the author is so stubbornly in favour of unused-variables-as-errors

FWIW, they also have a goal to emit as much output as possible, even in the face of compilation errors. They have stated that even syntax errors should have the compiler exit with a non-zero exit code, but still produce an executable that will give you a syntax error at runtime. The point of this being to allow you to iterate quickly, but force things like CI to fail.


Replies

bluecalmlast Saturday at 9:39 PM

Why not just use compile warnings and configure CI with -WError (same like your release build).

It seems like trying to fix the world of undisciplined developers at the cost of a common use case (experimenting and temporary accepting warnings).

chuckadamslast Sunday at 2:39 PM

The Eclipse Java Compiler is similar to this, and Haskell can defer type errors to runtime. You wouldn't make production builds that way, but it's otherwise a perfectly valid mode for a compiler to operate in.