digitalmars.D - import package.*
- Yaga-Shura (14/14) Oct 10 2007 Hello,
- Alexander Panek (7/9) Oct 10 2007 I think this question has been raised /so/ often, that you should find
- Yaga-Shura (3/14) Oct 10 2007 ok, i don't searched for anything... i'm sorry for that. i will search
- Bill Baxter (9/18) Oct 10 2007 It's not exactly obvious what to search for. "D programming import .*"
- Ary Manzana (4/15) Oct 10 2007 I also see a downside as to how DMD is implemented: when an import is
- Ary Manzana (3/19) Oct 10 2007 Well, thinking a little more, if you had import all.d, DMD would also do...
Hello, I'm working for some days now with DMD 2. My question is: is there any way to include all modules that are in one package? e.g.: module foo.bar; module foo.bar2; module foo.bar3; import foo.*(that's the way its done in java) i could create a file with: import foo.bar; import foo.bar2; import foo.bar3; and include this file. But that is not that effective, in my mind. Greetings Yaga-Shura
Oct 10 2007
On Wed, 10 Oct 2007 12:08:55 +0200 Yaga-Shura <Yaga-Shura yashu.de> wrote:I'm working for some days now with DMD 2. My question is: is there any way to include all modules that are in one package? e.g.:I think this question has been raised /so/ often, that you should find something in both, d.D.learn and d.D, newsgroups about it. Short answer: package/all.d publically importing all modules you want. -- Alexander Panek <alexander.panek brainsware.org>
Oct 10 2007
Alexander Panek wrote:On Wed, 10 Oct 2007 12:08:55 +0200 Yaga-Shura <Yaga-Shura yashu.de> wrote:ok, i don't searched for anything... i'm sorry for that. i will search for it and hope to find the answer WHY it's not implemented ;)I'm working for some days now with DMD 2. My question is: is there any way to include all modules that are in one package? e.g.:I think this question has been raised /so/ often, that you should find something in both, d.D.learn and d.D, newsgroups about it. Short answer: package/all.d publically importing all modules you want.
Oct 10 2007
Alexander Panek wrote:On Wed, 10 Oct 2007 12:08:55 +0200 Yaga-Shura <Yaga-Shura yashu.de> wrote:It's not exactly obvious what to search for. "D programming import .*" doesn't quite work.I'm working for some days now with DMD 2. My question is: is there any way to include all modules that are in one package? e.g.:I think this question has been raised /so/ often, that you should find something in both, d.D.learn and d.D, newsgroups about it.Short answer: package/all.d publically importing all modules you want.Or my favorite that no one else seems to like: "package/api.d", publicly importing the modules that are part of the standard API of your package. As for the reasons why D doesn't have it -- in most of the languages where it exists (python and java to my knowledge), its use is discouraged. Why add a feature just to recommend not using it? --bb
Oct 10 2007
Alexander Panek escribió:On Wed, 10 Oct 2007 12:08:55 +0200 Yaga-Shura <Yaga-Shura yashu.de> wrote:I also see a downside as to how DMD is implemented: when an import is found, it's module is parsed. So if you had .*, all the modules in that package would need to be parsed...I'm working for some days now with DMD 2. My question is: is there any way to include all modules that are in one package? e.g.:I think this question has been raised /so/ often, that you should find something in both, d.D.learn and d.D, newsgroups about it. Short answer: package/all.d publically importing all modules you want.
Oct 10 2007
Ary Manzana escribió:Alexander Panek escribió:Well, thinking a little more, if you had import all.d, DMD would also do that... Humm...On Wed, 10 Oct 2007 12:08:55 +0200 Yaga-Shura <Yaga-Shura yashu.de> wrote:I also see a downside as to how DMD is implemented: when an import is found, it's module is parsed. So if you had .*, all the modules in that package would need to be parsed...I'm working for some days now with DMD 2. My question is: is there any way to include all modules that are in one package? e.g.:I think this question has been raised /so/ often, that you should find something in both, d.D.learn and d.D, newsgroups about it. Short answer: package/all.d publically importing all modules you want.
Oct 10 2007