About Go, D module naming

Jonathan M Davis jmdavisProg at gmx.com
Fri Dec 21 08:36:11 PST 2012


On Friday, December 21, 2012 14:19:32 Peter Alexander wrote:
> On Friday, 21 December 2012 at 08:58:03 UTC, bearophile wrote:
> > Walter Bright:
> >> another large source of irritation if unused imports are
> >> errors.
> > 
> > In Go even unused variables are *errors* :-)
> 
> This is a tricky one. On one hand, it *is* a useful way to catch
> errors, but on the other it's a constant source of irritation
> when you are tinkering with code during development/debugging.

It also doesn't work with stuff like RAII and a lot of conditional compilation. 
Particularly with eponymous templates, it's _very_ common to have unused 
variables. Warnings or errors for unused variables would be highly detrimental 
to D.

- Jonathan M Davis


More information about the Digitalmars-d mailing list