A non-breaking Julia control-flow change to separate the One language from mortal languages, doomed to die
From a design patterns and DRY perspective it seems for
loops together with the break
statement are serving
as a useful try
/catch
mechanism for non-error situations. A common pattern defines a variable before a for
loop and tries to discern, using said variable, the circumstances of exiting the for
loop. Leveraging the embedded mental construct of try
/catch
blocks, we can simplify this repeating pattern and make it easier and more readable.
The syntax can look as follows:
for ...(loop vars here)...
...(local vars here)...
...