reddit discussion about Go turns to D again

Jonathan M Davis jmdavisProg at gmx.com
Mon May 16 15:29:27 PDT 2011


> "Mike Parker" <aldacron at gmail.com> wrote in message
> news:iqrbht$1k1o$1 at digitalmars.com...
> 
> > On 5/16/2011 12:06 PM, Andrei Alexandrescu wrote:
> >> On 05/15/2011 10:04 PM, Daniel Gibson wrote:
> >>> So you have to write
> >>> std.parallel_algorithm.map() instead of map() all the time?
> >> 
> >> alias std.parallel_algorithm p;
> >> 
> >> 
> >> Andrei
> > 
> > Or this, which I prefer to alias:
> > 
> > import p = std.parallel_algorithm;
> 
> What would be the difference between...
> 
> alias std.parallel_algorithm p;
> 
> ...and...
> 
> import p = std.parallel_algorithm;
> 
> ..?

Without private on the alias, it'll affect any module which imports the module 
that you created the alias on, and thanks to 
http://d.puremagic.com/issues/show_bug.cgi?id=6013 it'll happen anyway. I 
would also expect that using std.parallel_algorithm.func would still work with 
the alias whereas it wouldn't with the import p.

- Jonathan M Davis


More information about the Digitalmars-d mailing list