On Saturday, 14 November 2015 at 12:14:42 UTC, Handyman wrote:

The D docs seem very thorough and complete to me but less accessible in comparison to, e.g., Perl docs, Php docs, or Ruby docs. In particular I have difficulties in understanding the headers of the standard library function specifications (e.g.,: auto uniform(string boundaries = "[)", T1, T2, UniformRandomNumberGenerator)(T1 a, T2 b, ref UniformRandomNumberGenerator urng) if (isFloatingPoint!(CommonType!(T1, T2)) && isUniformRNG!UniformRandomNumberGenerator);

 auto // the return type is deduced
 uniform // the name of the function
(string boundaries = "[)", T1, T2, URNG) // the set if compile time parameters // a string that defaults to "[)" denoting a half open interval and three named types T1, T2 and URNG (T1 a, T2 b, ref URNG urng) // the set of runtime parameters a T1 , a T2 and an URNG taken by reference if (isFloatingPoint!(CommonType!(T1, T2)) && isUniformRNG!RNG); // a set of constraints to make sure you don't use the wrong types with it.

Reply via email to