Fantastic exchange from DConf
Guillaume Boucher via Digitalmars-d
digitalmars-d at puremagic.com
Wed May 10 05:56:32 PDT 2017
On Wednesday, 10 May 2017 at 01:19:08 UTC, Nick Sabalausky
(Abscissa) wrote:
> The moral of this story: Sometimes, breaking people's code is
> GOOD! ;)
I don't get the hate that compiler warnings get in the D
community.
Sure you can disable them if you don't care, but then don't
complain about C being inherently unsafe and bug-prone while
praising D for breaking things.
Uninitialized variables is an example that I think does not need
to be a language feature: If the compiler can prove the usage is
sound, everything is fine. The compiler has much deeper
knowledge about the concrete case than static language rules. If
analysis fails, issue a warning. Usually the problematic code is
far from obvious and refactoring is a good idea. If the
programmer still thinks that no action is needed, just suppress
that warning with a pragma.
More information about the Digitalmars-d
mailing list