reddit discussion about Go turns to D again
Alex_Dovhal
alex_dovhal at yahoo.com
Mon May 16 00:01:35 PDT 2011
"Andrei Alexandrescu" <SeeWebsiteForEmail at erdani.org> ???????/???????? ?
???????? ?????????: news:iqq4jv$2eh3$2 at digitalmars.com...
>> So you have to write
>> std.parallel_algorithm.map() instead of map() all the time?
>
> alias std.parallel_algorithm p;
Not so easy:
1. This alias would break UFCS possibility.
2. p is very short name, too good to be used for local variables - i, j, p,
q.
3. One have to remember always static import std.parallel_algorithm if he
also imports std.algorithm, but when he doesn't import std.algorithm -
he/she gets same function names. If he/she later adds import std.algorithm
he breaks all his previous code!!!
4. While to modules has same function signatures, one can use
std.parallel_algorithm everywhere because it looks like more general version
of std.algorithm.
Daniel proposal IMHO looks good, p_map, pMap??
More information about the Digitalmars-d
mailing list