Import concerns revisited
Walter Bright
newshound at digitalmars.com
Tue Jul 11 03:47:34 PDT 2006
xs0 wrote:
>> The imports can be placed anywhere in the module, even (ugh) inside
>> class definitions. 'import' isn't any easier to search for than 'alias'.
> I was wondering - is there any good reason to allow imports everywhere?
It's usually a good idea to make things as orthogonal, with as few
special case, as possible. Since imports are a declaration, they should
work wherever declarations work.
> OT: if you'll be changing the import system, _PLEASE_ make private
> imports the default.
It's too late for that, sorry. 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.
More information about the Digitalmars-d
mailing list