Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 18 Jan 2018 14:04:01 -0700
From:      Warner Losh <imp@bsdimp.com>
To:        "Conrad E. Meyer" <cem@freebsd.org>
Cc:        Eric van Gyzen <eric@vangyzen.net>, src-committers <src-committers@freebsd.org>,  svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   Re: svn commit: r327354 - head/sys/vm
Message-ID:  <CANCZdfosA5%2BU=7vsULp2fQy_=e7TTZ5Qs2BNtHuONONg_Qdegw@mail.gmail.com>
In-Reply-To: <CAG6CVpVuXUcPCX81Nv9XujRVw8psxpLSLRfG9T20w6sr4j6=PA@mail.gmail.com>
References:  <201712291905.vBTJ57gI072871@repo.freebsd.org> <20180117224054.GO8113@FreeBSD.org> <601ee1a2-8f4e-518d-4c86-89871cd652af@vangyzen.net> <CAG6CVpVuXUcPCX81Nv9XujRVw8psxpLSLRfG9T20w6sr4j6=PA@mail.gmail.com>

next in thread | previous in thread | raw e-mail | index | archive | help
On Thu, Jan 18, 2018 at 1:32 PM, Conrad Meyer <cem@freebsd.org> wrote:

> On Thu, Jan 18, 2018 at 12:01 PM, Eric van Gyzen <eric@vangyzen.net>
> wrote:
> > On 01/17/2018 16:40, Gleb Smirnoff wrote:
> >> Yeah, style is sacred, but is there a single person on Earth who would
> >> not agree that moving variables from smaller blocks to function block
> >> reduces readability of the code?
> >
> > I agree that it reduces the readability.  Not only that, it also
> > encourages real bugs by allowing access to the variable when it does no=
t
> > make sense.
>
> I think the right way to propose this kind of policy change is to get
> agreement on how style(9) should be modified =E2=80=94 not arbitrarily go
> against style(9) in some files.  The proposed change may be somewhat
> contentious and it might be a good exercise to go through the FreeBSD
> Community Process.
>
> I might separate these two concerns:
>
> 1. Allowing local / block scoped variables
> 2. Allowing C99 for loop initial declarations
>
> But I could see the argument that (2) is just a boring subset of (1).
>

Tell me again where #1/#2 are disallowed? I can't seem to find that in
style(9), except by a weak example of there being no examples of #1 or #2.

Warner



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?CANCZdfosA5%2BU=7vsULp2fQy_=e7TTZ5Qs2BNtHuONONg_Qdegw>