From owner-svn-src-head@freebsd.org  Mon Feb 19 23:57:11 2018
Return-Path: <owner-svn-src-head@freebsd.org>
Delivered-To: svn-src-head@mailman.ysv.freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1])
 by mailman.ysv.freebsd.org (Postfix) with ESMTP id 45AACF0B03D;
 Mon, 19 Feb 2018 23:57:11 +0000 (UTC) (envelope-from alnsn@yandex.ru)
Received: from forward100o.mail.yandex.net (forward100o.mail.yandex.net
 [IPv6:2a02:6b8:0:1a2d::600])
 (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
 (Client CN "forwards.mail.yandex.net", Issuer "Yandex CA" (verified OK))
 by mx1.freebsd.org (Postfix) with ESMTPS id C27F3736D9;
 Mon, 19 Feb 2018 23:57:10 +0000 (UTC) (envelope-from alnsn@yandex.ru)
Received: from mxback11g.mail.yandex.net (mxback11g.mail.yandex.net
 [IPv6:2a02:6b8:0:1472:2741:0:8b7:90])
 by forward100o.mail.yandex.net (Yandex) with ESMTP id 6B1C52A219A7;
 Tue, 20 Feb 2018 02:57:08 +0300 (MSK)
Received: from smtp2o.mail.yandex.net (smtp2o.mail.yandex.net
 [2a02:6b8:0:1a2d::26])
 by mxback11g.mail.yandex.net (nwsmtp/Yandex) with ESMTP id K3jJSKOwIQ-v8nuSqkL;
 Tue, 20 Feb 2018 02:57:08 +0300
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yandex.ru; s=mail;
 t=1519084628; bh=i3oq4H/TJdplbxQ4ApfY5XkRnQNlcr4GsXENzD/mup4=;
 h=Date:From:To:Cc:Subject:Message-ID:References:In-Reply-To;
 b=sZziPevSJVlq2mUxQxCqwNL3AKUCktCdA0tzWzJAKuVg5wZHUNkNQy2Hy73BpM7cP
 IFGHWdyPhV/9Vht0AuFUKlS3BtcL+koNNJkJlBQbTCnlYC+pegc8JS3s18o6iHPybH
 p/lSiSNYdf7ru5YZRjfZmZwbo9BPJ/6FoMI7F8qc=
Received: by smtp2o.mail.yandex.net (nwsmtp/Yandex) with ESMTPSA id
 6ryCWDVlxz-v6eqs3JS; Tue, 20 Feb 2018 02:57:06 +0300
 (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits))
 (Client certificate not present)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yandex.ru; s=mail;
 t=1519084627; bh=i3oq4H/TJdplbxQ4ApfY5XkRnQNlcr4GsXENzD/mup4=;
 h=Date:From:To:Cc:Subject:Message-ID:References:In-Reply-To;
 b=QaaOfMHQ9eVCN4daglXjg5Myf6ziWMR2OwkaCSmIZK7CfWvUaNRDKqqO7iqAQLehZ
 nN5sqDllSLuTzSUEJ7j0f3uofSfAdLheNuXaYWT4HeSf9fkVmmOH9UfIuKak29Xlm6
 +fXolBPzvId7LRGXrLy9TKnUraMOQxbalZoWaezc=
Authentication-Results: smtp2o.mail.yandex.net; dkim=pass header.i=@yandex.ru
Date: Mon, 19 Feb 2018 23:57:04 +0000
From: Alexander Nasonov <alnsn@yandex.ru>
To: Ian Lepore <ian@freebsd.org>
Cc: Kyle Evans <kevans@FreeBSD.org>, src-committers@freebsd.org,
 svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject: Re: svn commit: r329609 - head/stand/lua
Message-ID: <20180219235704.GB24491@neva>
References: <201802192229.w1JMTG9C082624@repo.freebsd.org>
 <1519079823.91697.30.camel@freebsd.org>
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
In-Reply-To: <1519079823.91697.30.camel@freebsd.org>
User-Agent: Mutt/1.9.2 (2017-12-15)
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
 <svn-src-head.freebsd.org>
List-Unsubscribe: <https://lists.freebsd.org/mailman/options/svn-src-head>,
 <mailto:svn-src-head-request@freebsd.org?subject=unsubscribe>
List-Archive: <http://lists.freebsd.org/pipermail/svn-src-head/>
List-Post: <mailto:svn-src-head@freebsd.org>
List-Help: <mailto:svn-src-head-request@freebsd.org?subject=help>
List-Subscribe: <https://lists.freebsd.org/mailman/listinfo/svn-src-head>,
 <mailto:svn-src-head-request@freebsd.org?subject=subscribe>
X-List-Received-Date: Mon, 19 Feb 2018 23:57:11 -0000

Ian Lepore wrote:
> On Mon, 2018-02-19 at 22:29 +0000, Kyle Evans wrote:
> > 
> > +???????????????????????-- Swap the first two menu entries
> > +???????????????????????menu_entries[1], menu_entries[2] = menu_entries[2],
> > +?????????????????????????? menu_entries[1];
> > ?
> 
> IMO, this is the sort of unreadable insanity that comes from having
> inflexible rules about line-wrapping which trump readability. ?The
> original code could be easily understood. ?The suggested replacement,?
> 
>     menu_entries[1], menu_entries[2] =
>     ? ? menu_entries[2], menu_entries[1]
> 
> Was also pretty readable, although not as much as it would be if it
> were all on one line. ?But splitting the line at the whitespace nearest
> to 80 columns just creates an unreadable mess for the insignificant
> virtue of following some arbitrary rule. ?(Which is why I very often
> ignore that rule and split lines at the point < 80 which makes the most
> sense for understanding the code, even if that means splitting at
> column 30.)

+1

Other possibilities are:

 - moving code to a helper function often removes extra indentation
 - shorter identifiers (e.g. as a side effect of moving code to a helper
   function)

		local function swap_1_2(t) t[1], t[2] = t[2], t[1] end

		swap_1_2(menu_entries)

  or 

		local function swap(t, i, j) t[i], t[j] = t[j], t[i] end

		swap(menu_entries, 1, 2)
-- 
Alex