what's the difference between 'static import =' and 'import ='?

John Reimer John_member at pathlink.com
Wed Jul 19 02:28:26 PDT 2006


In article <e9kp1b$hcm$1 at digitaldaemon.com>, Boris Wang says...
>
>
>> Ah... ok. Good to know. I guess we have a very flexible system in place, 
>> capable
>> of accomodating several styles.  And Walter gets to have his "static 
>> import" as
>> well. :)
>>
>> -JJR
>>
>>
>>
>
>No, I don't think so.
>
>Something need refining.
>
>Why not discard the sentence 'static import' ? When you need FQN to access a 
>package, just do it.
>
>For example
>
>int main(void)
>{
>    std.stdio.writefln("Just do it"); // not need any importing
>    ...
>}
>
>

Yes, I understand that there's a bit of a redundancy in the current
implementation, but I'm not sure the above solution is good one or really
necessary.  An import statement seems to give the compiler a quick lookup hint,
and meanwhile acts as a documentation tool indicating which module is going to
be used in a program.

The above is certainly a possibility for what might be termed "implied
importing".  But I'm not quite comfortable with it.  At this point, I don't have
any comments to the negative other than that, for the time being, I think we
have pushed the import issue far enough. :)

-JJR





More information about the Digitalmars-d-learn mailing list