You are a stupid programmer, you can't have that

jmh530 john.michael.hall at gmail.com
Mon Aug 9 18:47:35 UTC 2021


On Monday, 9 August 2021 at 18:00:23 UTC, H. S. Teoh wrote:
> [snip]
>
> Imagine if some time later somebody discovers a bug, and 
> introduces this fix:
>
> 	if (someCondition)
> 		doSomething();
> 	else
> 		doSomethingElse();
> 		return 1;	// <--- bugfix
> 	finishUp();
>
> Had braces been required, the `return 1;` would have been 
> introduced in the proper scope and there would have been no 
> problem. But now this fix has introduced a new bug.
>
>
> T

I strongly prefer requiring the braces are here.



More information about the Digitalmars-d mailing list