Just where has this language gone wrong?

Christophe Travert travert at phare.normalesup.org
Thu Jul 19 07:36:26 PDT 2012


"Petr Janda" , dans le message (digitalmars.D:172719), a écrit :
>> Array gets sorted, then doubles are removed (uniq) and then 
>> everything is converted to a string (map).
>>
>> Everything was recently introduced around 2.059.
> 
> Ok, but what is map!(). What's the point of the exclamation mark, 
> is it a template specialization?

Yes, !(...) is template specialization.
It is the equivalent of <...> in c++.
The parentheses can be omited if only one argument is passed after the 
exclamation mark.

map is a template of the std.algorithm module.
http://dlang.org/phobos/std_algorithm.html#map

This kind of questions should go in digitalmars.D.learn.

-- 
Christophe


More information about the Digitalmars-d mailing list