How do I defeat the gratuitous qualification of alias members?
Chad Joan
chadjoan at gmail.com
Fri Apr 5 10:59:17 PDT 2013
On 04/05/2013 01:48 PM, bearophile wrote:
> Chad Joan:
>
>> Hmmm, I don't remember python doing this. Do you mean like Java?
>
> See the solutions used in Python.
>
> But this stuff is long settled in D, so this discussion is now academic :-)
>
> Bye,
> bearophile
I skimmed some of the Python docs on this and it seems reasonable. In
Python I'd get my shorter example by doing something like:
from std.stdio import *
Which would put all of the std.stdio module's symbols into the current
module's lookup table. I probably used this a lot back when I used Python.
I also noticed something in there that I wish I could do in D:
from sound.effects import echo
echo.echofilter(input, output, delay=0.7, atten=4)
I think this would be analogous to the following D code, if it worked:
import std;
stdio.writeln("Hello world!");
That would be nice. D seems to force your symbol qualifications to be
either fully qualified or not qualified at all, which is not always the
best solution :/
If D can somehow do partially-qualified module names, then please teach me.
More information about the Digitalmars-d-learn
mailing list