Import concerns revisited

Dave Dave_member at pathlink.com
Mon Jul 10 12:56:04 PDT 2006


Dave wrote:
> Walter Bright wrote:
>>
>> D already has a lot of syntax in it. We should be very careful about 
>> adding more; not every convenience should have its own syntactic sugar.
> 
> I agree, but this will be a major convenience, imho.
> 
> The proposal here
> 
> http://www.digitalmars.com/drn-bin/wwwnews?digitalmars.D/39967
> http://www.digitalmars.com/drn-bin/wwwnews?digitalmars.D/39973
> 
> seems to meet this criteria:
> 
> a) address all of Kris' concerns (if not Kris, pipe in here).
> b) backward compatible.
> c) can be implemented w/o significanly changing the current compiler (I 
> think) other than for the import statement additions.
> d) is consistent with how import + alias works now.
> e) are a significant convenience.
> f) keep the visual continuity of import statements for maintenance 
> purposes.
> g) encourage good coding practices with regards to imports and aliasing.
> 
> - Dave

Taking Walter's criteria from Lionello's post:

 > Each idea goes through a gauntlet of:
 > 1) is lack of this idea turning users away from D

Right now, I don't know. Based on the response of several long-time 
users and many in this newsgroup, it probably will once more complex 
projects are attempted, especially libraries.

 > 2) how much power it adds

It adds the ability to import specific symbols - a quite powerful 
addition to import I think.

 > 3) how much complexity it adds

Not a lot for the programmer. It could actually remove a large amount of 
complexity for large projects. It doesn't change how import or alias 
work now so it doesn't add any complexity if not used.

 > 4) is it consistent with the rest of D

Yes.

 > 5) how hard is it to implement

 From my understanding, not very.

 > 6) how does it rank in importance against all the other ideas

 From the response over this weekend, I'd say "NEAR THE TOP".



More information about the Digitalmars-d mailing list