usewhile
Usewhile is a proposed or experimental control-flow construct designed to combine a while-style loop with automatic resource management. In languages that explore this idea, usewhile aims to ensure that resources acquired during each iteration are reliably released when that iteration completes, even if the loop exits early due to a break or an exception.
The common form is usewhile (condition) { … } where the body contains the work for the current iteration.
Semantically, usewhile maintains that the loop continues while the condition holds, and at the end of each
Use cases for usewhile include streaming I/O, per-iteration processing of data items, and patterns where resources
See also: while loop, context manager, resource management, deterministic finalization, try-with-resources.