guard clause style static if

kdevel kdevel at vogtner.de
Tue Jul 10 12:05:11 UTC 2018


On Saturday, 7 July 2018 at 13:12:59 UTC, Alex wrote:
> The site you cited for the guard clause above (c2.com)
> works at runtime.

?

> The intention is to shorten the paths inside a function, I 
> think. Therefore, a static "guard clause" is a contradiction, 
> if I understand it correctly.

The term "guard clause" denotes a style of organizing code 
differently. The addressee is not the compiler but the human.


More information about the Digitalmars-d-learn mailing list