<html><head><meta http-equiv="content-type" content="text/html; charset=utf-8"></head><body dir="auto"><div>T.J. Usiyan <<a href="mailto:griotspeak@gmail.com">griotspeak@gmail.com</a>> wrote:<br><br></div><blockquote type="cite"><b style="font-size:13px;font-family:Menlo">import</b><span style="font-size:13px;font-family:Menlo"> Foo </span><b style="font-size:13px;font-family:Menlo">using</b><span style="font-size:13px;font-family:Menlo"> (bar, Baz, qux, waldo <b>as</b> fred) <font color="#919191">// a "whitelist import"</font></span><div><b style="font-size:13px;font-family:Menlo">import</b><span style="font-size:13px;font-family:Menlo"> Foo </span><b style="font-size:13px;font-family:Menlo">hiding</b><span style="font-size:13px;font-family:Menlo"> (bar, Baz, qux, waldo <b>as</b> fred) <font color="#919191">// a "blacklist import"</font></span><div><blockquote style="margin:0px 0px 0px 40px;border:none;padding:0px"><br></blockquote>Is nice but `hiding… (waldo as fred)` is confusing. Am I hiding waldo?</div></div></blockquote><div><br></div><div>You're right That's also what Robert pointed out in his reply. The way I thought it is "hide waldo, naming it as fred instead." I like the symmetry of it with the `import-using` statement, but true, it doesn't read well.</div><div><br></div><div>Hmm, given that keywords are still up in the air, why not s/hiding/<b>except</b>/? Then we'd have:</div><div><br></div><div><div><font color="#000000"><span style="background-color: rgba(255, 255, 255, 0);"><b>import</b> Foo <b>using</b> (bar, Baz, qux, waldo <b>as</b> fred) // a "whitelist import"</span></font><div><font color="#000000"><span style="background-color: rgba(255, 255, 255, 0);"><b>import</b> Foo <b>except</b> (bar, Baz, qux, waldo <b>as</b> fred) <font>// a "blacklist import"</font></span></font></div></div></div><div><br></div><div>The double meaning of "except" in the phrases "except X" (without X) and "except X as Y" (everything else as is, but X as Y) would work.</div><div><br></div><div>And no one would write the silly sounding empty `import Foo except ()` anyway because the plain `import Foo` works too.</div><br><blockquote type="cite"><div><div>It is also strange to look in that list for things that I am hiding and things that I am importing. Context switches after the item that I am importing because `as` follows the item in question.</div></div></blockquote><br><div>I'd say that's entirely ok. You could by convention e.g. keep a habit of listing all renames together (in the end of the list, or in another import-except statement), which could be checked by a linter if someone wanted.</div></body></html>