static foreach does not introduce a new scope on its own; instead one has to add a nested set of braces.
Currently, dfmt splits them which wastes a good amount of screen space and might look a bit odd.
Current format
static foreach (item; items)
{
{
// code here
}
}
static foreach (item; items) {
{
// code here
}
}
Idea
I’d prefer to have the scope braces right next to the loop braces.
static foreach (item; items)
{{
// code here
}}
static foreach (item; items) {{
// code here
}}