[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAGudoHGOxs0V0VHxt5MBO0axvCK0ucByXpvzFiADOVbTvhv_yA@mail.gmail.com>
Date: Thu, 3 Apr 2025 21:17:17 +0200
From: Mateusz Guzik <mjguzik@...il.com>
To: Linus Torvalds <torvalds@...ux-foundation.org>
Cc: James Bottomley <James.Bottomley@...senpartnership.com>,
Christian Brauner <brauner@...nel.org>, Leon Romanovsky <leon@...nel.org>, pr-tracker-bot@...nel.org,
linux-fsdevel@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [GIT PULL] vfs mount
On Thu, Apr 3, 2025 at 8:10 PM Linus Torvalds
<torvalds@...ux-foundation.org> wrote:
>
> On Thu, 3 Apr 2025 at 10:21, Mateusz Guzik <mjguzik@...il.com> wrote:
> >
> > I would argue it would be best if a language wizard came up with a way
> > to *demand* explicit use of { } and fail compilation if not present.
>
> I tried to think of some sane model for it, but there isn't any good syntax.
>
> The only way to enforce it would be to also have a "end" marker, ie do
> something like
>
> scoped_guard(x) {
> ...
> } end_scoped_guard;
>
> and that you could more-or-less enforce by having
>
> #define scoped_guard(..) ... real guard stuff .. \
> do {
>
> #define end_scope } while (0)
>
Ye I was thinking about something like that would was thoroughly
dissatisfied with the idea.
Perhaps a tolerable fallback would be to rely on checkpatch after all,
but have it detect missing { } instead of relying on indentation
level?
--
Mateusz Guzik <mjguzik gmail.com>
Powered by blists - more mailing lists