2 ms·
Why is there a special guard keyword? Scope limits are already clear.
by kzrdude 6y ago
Why is there a special guard keyword? Scope limits are already clear.
- ufo 6y ago> The guard statement allows for a library implementation. Foregoing the possibility of a library implementation, a possible design choice could be to eliminate the guard statement as it would eliminate the need for an additional reserved keyword and the requirement for programmers to create guarded blocks around deferred statements. If the guard statement is not used, the proposed changes to the behavior of the break statement would likely be eliminated as well (see Appendix K).