braceless with statements
Ogi
ogion.art at gmail.com
Sat Nov 13 10:43:04 UTC 2021
On Friday, 12 November 2021 at 15:33:38 UTC, Steven Schveighoffer
wrote:
> No, you are wanting to use the members of `s` many times, and
> don't want to have to repeat `s.` all the time. This isn't a
> great example because of the brevity. But imagine a long
> expression instead of the single-letter variable.
>
> `with` already works as noted in the first case, the second
> case would just be a way to write the same thing but without
> braces (and indentation).
I see, thanks.
Can’t say I am a fan of this proposal. Are you in the same scope
as a few hundred lines above? With braces and indentation, the
answer is clear. Without them, you’ll have to look for `with`
labels that don’t stand out visually at all.
More information about the Digitalmars-d
mailing list