import concerns (was Re: Historical language survey)

Derek Parnell derek at psych.ward
Sat Jul 8 01:22:23 PDT 2006


On Sat, 08 Jul 2006 13:36:49 +1000, Walter Bright  
<newshound at digitalmars.com> wrote:


> But the suggestions involve changing the importer code, too. I'm not  
> seeing the advantage of that over fully qualifying the references or  
> using an alias, both of which will ensure that no future imports will  
> cause name collisions.

I tend to agree with Walter on this one. The only thing that might be  
needed in a post 1.0 edition of D is some syntax help to make the job of  
tedious alias coding a lot easier.

> What can be done is something like add a warning whenever a name is  
> found using the second-class import lookup, rather than using an alias  
> or a fully qualified lookup. Then, you'll be able to easily purge your  
> code of any such, and be confident that adding other modules will not  
> break your existing code.

Not a bad idea at all.

> What can also be done is extend the import declaration to allow the .'s  
> to continue so that specific symbols can be imported.

An excellent idea because it does the job and follows the consistent look  
of D. Makes my job in Build a bit harder though ;-)

-- 
Derek Parnell
Melbourne, Australia



More information about the Digitalmars-d mailing list