How about Go's... error on unused imports?

bearophile bearophileHUGS at lycos.com
Fri Nov 13 12:16:07 PST 2009


Bill Baxter:

> It would be a convenient feature, but in both Java and Python where
> they have this feature, its use is frowned upon.

I agree, but:
- It may be handy in small script-like programs.
- It has the advantage of removing the need of the "all.d" modules that are hackish.
- Once you use it such * syntax can be recognized by automatic tools that test for code quality (like an IDE, or like this single Python module used by Google to spot troubles in C++ code: http://google-styleguide.googlecode.com/svn/trunk/cpplint/cpplint.py ). So they may complain :-)

Bye,
bearophile



More information about the Digitalmars-d mailing list