From owner-svn-src-head@freebsd.org Fri Jan 19 20:16:46 2018 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 6CD7CEC57B1 for ; Fri, 19 Jan 2018 20:16:46 +0000 (UTC) (envelope-from marklmi26-fbsd@yahoo.com) Received: from sonic302-4.consmr.mail.bf2.yahoo.com (sonic302-4.consmr.mail.bf2.yahoo.com [74.6.135.43]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 2D4CA727F9 for ; Fri, 19 Jan 2018 20:16:45 +0000 (UTC) (envelope-from marklmi26-fbsd@yahoo.com) X-YMail-OSG: eJ3Pp5oVM1lj_hKLM8NIxBQLFtAs5o6ygIwlC9lsSW9nK3WGvFvw_JTDkrwihMO 1yCtURxYvDtPy4wH23zB_ZWxzMNyvhfhe0s9l.fPcc5yaTK0Ovw1KUQo3DzsnE1qDxiMM6ZWKceh lBCpY3ajVdtTAULbMRcmtlaoaX86B5sV9L7qq5oyFUEfx0DlWUvS6SuyYpNHEY1M0cEwdmpzke27 kEntfjCoY3bw7o6yrR8jGYQVdlqxEAALep26z99XLMIUrPNMpEcG1EiuOTWT4D7MvJLrlMTLkLkA 2Eb_mrcEd8pyaTQ5XN9uHLNwIAW6DCeffzD6G5oKzfsiOAic26n4HlUIQ5HA6DvYAe2agFm2NuBI 6I_ByCfVU9vBqmYrSzZajGORCidawRdUfojMQxI0Psm7_WWhwK6v8eoGIYQfVKI8djGZsWVvcj95 2peaaSpMhMu3vNbGXxGDwLxte264YtGat9ygC.ShDFJ_D_hIjJDZ9dPGobQKJE7VjsaZU8Vr2P9T V0ZxX_A-- Received: from sonic.gate.mail.ne1.yahoo.com by sonic302.consmr.mail.bf2.yahoo.com with HTTP; Fri, 19 Jan 2018 20:16:44 +0000 Received: from smtp103.rhel.mail.bf1.yahoo.com (EHLO [192.168.1.25]) ([98.139.230.213]) by smtp411.mail.bf1.yahoo.com (JAMES SMTP Server ) with ESMTPA ID c6408ab2eabbf07a2668b9a0e0629f04 for ; Fri, 19 Jan 2018 20:16:39 +0000 (UTC) From: Mark Millard Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: quoted-printable Mime-Version: 1.0 (Mac OS X Mail 10.3 \(3273\)) Subject: Re: svn commit: r327354 - head/sys/vm Message-Id: Date: Fri, 19 Jan 2018 12:16:37 -0800 To: svn-src-head@freebsd.org X-Mailer: Apple Mail (2.3273) X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 19 Jan 2018 20:16:46 -0000 Rodney W. Grimes freebsd at pdx.rh.CN85.dnsmgr.net wrote on Fri Jan 19 18:39:03 UTC 2018 (quoting style(9)): > I think everyone glossed over: >=20 > Parts of a for loop may be left empty. Do not put declarations = inside > blocks unless the routine is unusually complicated. >=20 > Perhaps that second sentence should be extracted into a paragraph of = its own? > This does sound very much like what you said that you do in another = reply > in this thread. That is what I vaguely remember, now that I see it. I'm not so worried about code generation by compilers for the distinctions or the liveness tracking. I'm more worried about my own efforts during an analysis of the source code. When I have to analyze/study unfamiliar functions, the size of the range of source code where various variables might have been used can complicate things and increases the amount of analysis, including checking for a lack of interference by other code than turns out to be outside the "its live" scope. Closer approximation to minimizing the range of text helps with my doing a reliable analysis and lets a higher fraction of my time be spent on other aspects. In other words, it may take less for me to classify something as "unusually complicated" compared to some other folks. Overall I tend to like putting to use principles of locality when they readily apply. As for names repeated in nested scopes (the same name space), even absent a language rule disallowing such, I support being able to have all such examples reported as at least informational messages of some kind, possibly even selectable as "desired errors" in the sense of stopping compiles from generating object files despite not violating the language's criteria. =3D=3D=3D Mark Millard marklmi at yahoo.com ( markmi at dsl-only.net is going away in 2018-Feb, late)