The One-Letter Nested Function - a sample article for some kind of

Jos van Uden user at domain.invalid
Fri Mar 9 05:29:17 PST 2012


On 13-2-2012 15:14, bearophile wrote:
> Zach the Mystic:
>
>> void setRandomColorPair( ref ColorPair cp )
>> {
>>      import std.random;
>>      ubyte u(int a, int b) { return cast(ubyte) uniform(a,b); }
>
> Where possible it's good to add "static" to nested functions:


Why?


More information about the Digitalmars-d mailing list