Import concerns revisited

Kirk McDonald kirklin.mcdonald at gmail.com
Tue Jul 11 17:01:54 PDT 2006


Bill Baxter wrote:
> In article <44B409E6.5060602 at nospam.org>, Georg Wrede says...
> 
>>Walter Bright wrote:
>>
>>>xs0 wrote:
>>>
>>>>OT: if you'll be changing the import system, _PLEASE_ make private 
>>>>imports the default.
>>>
>>>
>>>It's too late for that, sorry. 
>>
>>AAARRGGGHHHHH!!!!!
>>
>>I've taken it for granted this was implicitly agreed to be fixed for 
>>months ago.
>>
>>
>>>Also, everything else in D is public by 
>>>default, and consistency is sometimes better than special case rules, 
>>>even if those special case rules make some things easier.
>>
>>Importing is conceptually distinct enough, so nobody would even notice 
>>this "inconsistency".
>>
>>Please reconsider.
>>
>>(As noted earlier, broken code, in this case, is easily fixed with a 
>>global replace of "import" to "public import".)
> 
> 
> I'm curious...
> 
> Q1: How many D users out there are *opposed* to imports being private by
> default?  Even if it requires everyone to change their code?
> 
> Q2: How many D users out there are *opposed* to imports being "static" by
> default?  Even if it requires fixing the imports in every D source file
> everywhere?
> 
> All I've heard in this discussion is proponents for these two changes, with the
> exception of Walter, of course.
> 
> Maybe it's time for some sort of strawman -1/0/+1 vote just to see where people
> lie.  From were I sit it seems like Walter is the only one opposed to these
> changes, mainly because he doesn't want to break people's code.  But those same
> people he's trying to protect seem to be saying "break our code, please!"  Are
> the teeming fans of the status quo just being quiet, letting Walter duke it out
> for them?
> 
> --Bill
> 
> 

I've now written a library for D with about a dozen source files and 
somewhere between one and two thousand lines of code (most of it 
generated, but even so). If D's import semantics are improved, I do not 
care a whit if it breaks every single module I've written. I'm more than 
willing to change to a new system.

Of course, I'm a relative newcomer to the language, and Pyd is my only 
project in it of any size.

-- 
Kirk McDonald
Pyd: Wrapping Python with D
http://dsource.org/projects/pyd/wiki



More information about the Digitalmars-d mailing list