About Go, D module naming

Jonathan M Davis jmdavisProg at gmx.com
Fri Dec 21 21:01:54 PST 2012


On Friday, December 21, 2012 22:12:31 David Nadlinger wrote:
> On Friday, 21 December 2012 at 20:33:47 UTC, Jonathan M Davis
> 
> wrote:
> > If we didn't have -w,
> > then we could use warnings for stuff which was probably but not
> > definitively
> > wrong and which was okay to force people to change […] But
> > because
> > of -w, you can't […]
> 
> I don't think this is a valid argument: GCC has a similar flag
> (-Werror) too that many people use – for eaxmple, Google build
> all their code with it enabled, and other companies probably just
> as well – but still the compiler has quite a number of "best
> practices" warnings, e.g. regarding operator precedence rules.

gcc also warns by default rather than not giving warnings at all, so the 
situation is a bit different. -w used to be the _only_ way to even get warnings 
with dmd. Also, you have to be _way_ more careful with stuff like that in D 
because of all of the conditional compilation and compile-time introspection 
that it does. Using -w can drastically change the semantics of your code. And 
in the case of unused variables, it would completely break Phobos, because so 
many traits legitimately use unused variables. If anything, I think that it 
makes having -w at all a big mistake, but we have it, and I very much doubt 
that it's going away.

- Jonathan M Davis


More information about the Digitalmars-d mailing list