[Haskell-cafe] Enable -Wall by default?
Albert Y. C. Lai
trebla at vex.net
Thu Dec 10 19:46:21 UTC 2020
-1 from me. I vote for the status quo.
0. I believe that it really comes down to a vote (as opposed to settling
by technical merit). My work habit (which stems from my personality) is
going to be the opposite of many people's, and vice versa. Every
"technical merit" cited on this issue is conditional on accepting a
certain personality. So yes it has to come down to a vote. I'm OK if I
happen to be in the minority.
1. -Wall warnings have almost zero correletion with my mistakes. (See?
my personality dictates what mistakes I make. YMMV.)
An example is unused binds. My unused binds are intentional, thank you
very much. I make unused binds because it's future-proof---perhaps I
will actually use it in the next version? Editing from
(p, _q) = f x
to
(p, q) = f x
produces noise in diffs and commits, no? Some of you are against noisy
diffs and commits, no? Then embrace unused binds!
2. In fact, I go so far as adding -fdefer-type-errors during the first
99% of a development cycle. Why? Because ghci is so much more
informative when :load succeeds. Tab completion works. :type works.
Asking for where a local variable is defined works. Asking for the type
of an arbitrary subexpression works. (I use those features via emacs
haskell-mode or dante, of course.) Would be a pity to throw that all
away just for unfinished code. Hell, to finish the unfinished code, I
need those ghci features. 90% of the people who think they need a
Haskell IDE, they just need this, -fdefer-type-errors and a low-tech
editor plugin that actually knows what ghci offers.
-fdefer-type-errors still gives me compile-time warnings for what should
be static errors. I am not losing any information. Clearly, I don't
consider my job done until all-clear. Just let me do my job.
On 2020-12-10 2:50 a.m., Georgi Lyubenov wrote:
> For me, the default is -Wall and the "production" version is also
> turning on -Werror.
>
> I'm +1 on this.
>
> =======
> Georgi
>
> _______________________________________________
> Haskell-Cafe mailing list
> To (un)subscribe, modify options or view archives go to:
> http://mail.haskell.org/cgi-bin/mailman/listinfo/haskell-cafe
> Only members subscribed via the mailman list are allowed to post.
>
More information about the Haskell-Cafe
mailing list