Has someone encountered similar issues with -cov?

Ola Fosheim Grøstad via Digitalmars-d digitalmars-d at puremagic.com
Sat Jul 2 03:01:10 PDT 2016


On Friday, 1 July 2016 at 20:08:30 UTC, Andrei Alexandrescu wrote:
>> To remove that feedback would mess up someone else's use case.
>
> This argument is phony. Unconvinced. -- Andrei

If you are hellbent on using a loop to execute a scope once, do 
something that makes it clear at the top of the scope:

for once {
    ...
}

e.g.:

import std.stdio;

void main(){

	foreach(_;[1]){
		writeln("once");
	}
	
}



More information about the Digitalmars-d mailing list