<html><head><meta http-equiv="Content-Type" content="text/html charset=iso-8859-1"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><br><div><div>On Jan 7, 2013, at 10:42 AM, Kosztka Imre Dávid <<a href="mailto:kosztkaid@gmail.com">kosztkaid@gmail.com</a>> wrote:</div><br class="Apple-interchange-newline"><blockquote type="cite"><div dir="ltr">How can we help?</div></blockquote><div><br></div><div>Modules is a big feature, and there are a few places where one could help. Some ideas:</div><div><br></div><div>  - Diagnostics: when we produce diagnostics that point to a source location within a module (e.g., in a note or macro expansion), the "imported from" backtrace only mentions module names (e.g., "std") rather than submodule names ("std.tgmath"). We should provide better granularity here.</div><div><br></div><div>  - Fix-Its: we may know about a module that has not yet been imported, in which case we should provide a Fix-It to import the module if that would cause ill-formed code to work. For example,</div><div><br></div><div><span class="Apple-tab-span" style="white-space:pre">  </span>Foo bar(); // error: unknown type name 'Foo'</div><div><br></div><div>    could turn into; // error: unknown type name 'Foo' is available by importing the module 'MyLib.Foo'</div><div><br></div><div>   with a Fix-It that adds 'import MyLib.Foo' or '#include <MyLib/Foo.h>" in a reasonable place.</div><div><br></div><div>  - Track which explicitly-imported modules have not had any of their declarations used, and produce "unused import" warnings at the end of a translation unit. For example:</div><div><br></div><div><span class="Apple-tab-span" style="white-space:pre">       </span>import std.tgmath;</div><div><span class="Apple-tab-span" style="white-space:pre">   </span>import std.io;</div><div><br></div><div><span class="Apple-tab-span" style="white-space:pre">      </span>int main() {</div><div><span class="Apple-tab-span" style="white-space:pre"> </span>  printf("Hello\n");</div><div><span class="Apple-tab-span" style="white-space:pre">  </span>}</div><div><br></div><div><span class="Apple-tab-span" style="white-space:pre">   </span>// warn about unused import 'std.tgmath'.</div><div><br></div><div>    The same should work for #includes that have automatically be translated into imports.</div><div><br></div><div>  - Fix NamespaceAliasDecl so that it is "redeclarable". In other words, given</div><div><br></div><div><span class="Apple-tab-span" style="white-space:pre">  </span>namespace filesystem { }</div><div><span class="Apple-tab-span" style="white-space:pre">     </span>namespace fs = filesystem;</div><div><span class="Apple-tab-span" style="white-space:pre">   </span>namespace fs = filesystem;</div><div><br></div><div>    make sure that the two 'fs' declarations are properly chained together, like we do for all other redeclarations.</div><div><br></div><div>  - Improve the 'modularize' tool I hacked up (sources attached), which attempts to find non-modular behavior in a set of header files. This tool is going to be really important when trying to take an existing (probably horrible) set of system headers and figuring out how to tweak them to be modular enough.</div><div><br></div><span class="Apple-tab-span" style="white-space:pre">      </span>- Doug</div><div><br></div><div></div></body></html>