digitalmars.D - import alias
- Simon Hobbs (9/9) Jul 11 2004 Another idea nicked from C#. I often find that I want to make an alias f...
imported namespace and it would be convenient to do it in a single line of code. E.g. import SomeCompany.SomeLibrary.SomeClass = MyAlias; instead of: import SomeCompany.SomeLibrary.SomeClass; alias SomeCompany.SomeLibrary.SomeClass MyAlias; I'm very, very lazy :) Si
Jul 11 2004
I like the idea, but would prefer something more like... import foo.bar.baz as fbz; -Chris S. -Invironz Simon Hobbs wrote:imported namespace and it would be convenient to do it in a single line of code. E.g. import SomeCompany.SomeLibrary.SomeClass = MyAlias; instead of: import SomeCompany.SomeLibrary.SomeClass; alias SomeCompany.SomeLibrary.SomeClass MyAlias;
Jul 11 2004
In article <ccrijv$176d$1 digitaldaemon.com>, C. Sauls says...I like the idea, but would prefer something more like... import foo.bar.baz as fbz;Exactly. Just like Python does it :)
Jul 11 2004
heretic wrote:Exactly. Just like Python does it :)I'm still tempted to request 'from' too... could you imagine: from std.string import toString as toStr; from mango.io.FilePath import MutableFilePath as XPath; -Chris S. -Invironz
Jul 12 2004