[Issue 3819] [module system] Tiding up the imports
d-bugmail at puremagic.com
d-bugmail at puremagic.com
Tue Feb 14 12:17:01 PST 2012
http://d.puremagic.com/issues/show_bug.cgi?id=3819
Walter Bright <bugzilla at digitalmars.com> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |bugzilla at digitalmars.com
--- Comment #11 from Walter Bright <bugzilla at digitalmars.com> 2012-02-14 12:16:57 PST ---
I agree. D has excellent support for anti-hijacking, which I feel serves the
purpose well.
As for this case:
import std.c.stdio;
enum int BUFFSIZE = 2048;
long[BUFSIZ] foo;
void main() {}
That's a general problem with typos, not specifically with imports. I don't see
any hope for any computer language to fix this. All computer languages rely on
different names being completely distinct, even if they differ by only one
character. There's no solution for it.
You could perhaps write a lint program that looked for names in scope that
differed by only one character in the middle of the identifier and issued
warnings, but I can't see that as being part of the language.
In any case,
1. mucking with how imports work is the wrong solution to typos
2. this would break every D program in existence
Wontfix.
--
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
More information about the Digitalmars-d-bugs
mailing list