From owner-svn-src-head@freebsd.org Sun Feb 18 02:53:13 2018 Return-Path: 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 07C7EF076C8; Sun, 18 Feb 2018 02:53:13 +0000 (UTC) (envelope-from cse.cem@gmail.com) Received: from mail-io0-f180.google.com (mail-io0-f180.google.com [209.85.223.180]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 909FB7D8C9; Sun, 18 Feb 2018 02:53:12 +0000 (UTC) (envelope-from cse.cem@gmail.com) Received: by mail-io0-f180.google.com with SMTP id u84so8033979iod.9; Sat, 17 Feb 2018 18:53:12 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:reply-to:in-reply-to:references :from:date:message-id:subject:to:cc:content-transfer-encoding; bh=F0bca4ZXOXyDYcudNIM0qL20qBXAe/5IlRKq5/KtVwA=; b=dsdPggJK9GUQ9b7CFhNsDsu68m5DXnEoVKJT/y61KCY7NANdiZJMNqmaPS73lyQbyp eZIJeX9wRChSUc8TwTi64E/FfDxB+hI4PCgFMwAHfwjyK1LWNgvbNJrtE2/pQnLd9XKx 1rwrX5MOP6hr8+FbY4KJMewhX/1BCnv0AyyzutclN4DK3uWkrtsgXdngu43gwzGp6QV7 riG/VO7BlhWTQmulOESzNSKF33hgK1E+ldMr8Bd6S6tdtPLFbNEPFLsiaeOx3QD5GY/W 2lr8iL7rmHBJX1iSiFznbdYZL/hruJpj+3csLGmNNwLw0J+2olpebnQ2pSzpEZSNw1hi kZ5Q== X-Gm-Message-State: APf1xPB1CVLiF5H/9jrUO6h2bKPCLEZrPRfHefGhvWm/247hl/SN97sg 4l+kGq3AvUg/9g5kyUavfjjBfqQS X-Google-Smtp-Source: AH8x2261kBgJinCVRZ3e7gqcNXewFPUbXpAUNV7QLUW1CLl8ZEIcSlYMtGg51Pm07W5FJL+YwilczQ== X-Received: by 10.107.161.200 with SMTP id k191mr3027815ioe.270.1518922386160; Sat, 17 Feb 2018 18:53:06 -0800 (PST) Received: from mail-it0-f43.google.com (mail-it0-f43.google.com. [209.85.214.43]) by smtp.gmail.com with ESMTPSA id j88sm805408iod.22.2018.02.17.18.53.06 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sat, 17 Feb 2018 18:53:06 -0800 (PST) Received: by mail-it0-f43.google.com with SMTP id w63so5815145ita.3; Sat, 17 Feb 2018 18:53:06 -0800 (PST) X-Received: by 10.36.243.7 with SMTP id t7mr8195630ith.61.1518922385891; Sat, 17 Feb 2018 18:53:05 -0800 (PST) MIME-Version: 1.0 Reply-To: cem@freebsd.org Received: by 10.2.30.149 with HTTP; Sat, 17 Feb 2018 18:53:05 -0800 (PST) In-Reply-To: <201802180135.w1I1ZkcF097492@repo.freebsd.org> References: <201802180135.w1I1ZkcF097492@repo.freebsd.org> From: Conrad Meyer Date: Sat, 17 Feb 2018 18:53:05 -0800 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: svn commit: r329504 - head/stand/lua To: Kyle Evans Cc: src-committers , svn-src-all@freebsd.org, svn-src-head@freebsd.org Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable 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: Sun, 18 Feb 2018 02:53:13 -0000 On Sat, Feb 17, 2018 at 5:35 PM, Kyle Evans wrote: > Author: kevans > Date: Sun Feb 18 01:35:46 2018 > New Revision: 329504 > URL: https://svnweb.freebsd.org/changeset/base/329504 > > Log: > stand/lua: More style nits, config.lua > > Some other points I think we need to be consistent on: > - Spacing around string concatenation (always) +1. ".." is just another (infix) operator, and we put spaces around operat= ors. > - Test against 'nil' explicitly rather than relying on 'not' for things= that > reasonably won't be returning a boolean. e.g. loader.getenv > > Eventually this will all get formalized somewhere. +1. Ideally sooner rather than later. Maybe a luastyle.9? :-) One thing we've done so far I'm not sold on is parentheses around conditionals. Unlike C, this is not a language requirement, and it isn't common in other lua codebases, e.g., https://github.com/luarocks/lua-style-guide . (Take that guide with a grain of salt =E2=80=94 it suggests treating nil as boolean false, which I agree is probably wrong.) Best, Conrad