digitalmars.D - Implicit Imports - translated
- TechnoZeus (21/21) Apr 27 2005 Kevin Bealer was nice enough to give me permission to quote his translat...
Kevin Bealer was nice enough to give me permission to quote his translation of my implicit imports idea, so here it is for anyone who was still having trouble understanding how it would work or what use it would be... <quote> Okay - I see now. You mean a sort of default translation: use splitlines() --> automatic import std.strings; use writef() --> automatic import of std.stdio; True -- that would not hurt compile time. What you are suggesting elevates these identifiers to special status. Is that a good or bad thing? Hard to say. The learning curve is a little softer at the beginning this way. On the other hand, if you are reading someone else's program (as a newbie), and you don't recognize someFunction(), you can't dig through the imports for it. So it would need to be only the very very common identifiers, as you say. I think that most newer languages steer away from "special" behavior of the standard libraries, but I'm not sure if there is a good reason to, per se. There was probably an expectation that some C++ (for example) programmers would create their own, complete, alternative to the standard library, but this never really happens. Kevin Bealer </quote> I hope that helps clear things up. Sorry I wasn't able to find the words to make it clear and simple on my own. Thanks Kevin. Don - TechnoZeus
Apr 27 2005