braceless with statements
kdevel
kdevel at vogtner.de
Fri Nov 12 12:52:28 UTC 2021
On Friday, 12 November 2021 at 10:59:39 UTC, Stefan Koch wrote:
[...]
> ```D
> {
> with(s):
> // only vaild for this scope
> }
> // s.x is not valid here anymore
> ```
That's good, but why stop half way? Drop the colon, drop the
parentheses, allow a comma expression:
A a; B b; ...; Z z;
:
with a, b, ..., z;
which is "lowered" to
with (a) {
with (b) {
:
with (z) {
:
}
:
}
:
}
More information about the Digitalmars-d
mailing list