From owner-svn-src-head@freebsd.org Sun Feb 18 03:04:06 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 04164F086BB; Sun, 18 Feb 2018 03:04:05 +0000 (UTC) (envelope-from byond.lenox@gmail.com) Received: from mail-lf0-f47.google.com (mail-lf0-f47.google.com [209.85.215.47]) (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 56CF87E49B; Sun, 18 Feb 2018 03:04:05 +0000 (UTC) (envelope-from byond.lenox@gmail.com) Received: by mail-lf0-f47.google.com with SMTP id 37so8824648lfs.7; Sat, 17 Feb 2018 19:04:05 -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:in-reply-to:references:from:date :message-id:subject:to:cc:content-transfer-encoding; bh=kvMwVSvNKp17CVCnMcMYVYHj4Zs7ARODNMGXfAf/5+k=; b=flf7mDBLLpClGQhOcnTypriBpdLkFPL0TK2f9K0o8ENvouTxb3bYip7bIn0HKeQPp1 TZv5NiBOjHtxfv/CL9ch6AjjuOM/MP+7hHQqF43KEiC/GxzOLZ2wBOTdfSEJaZkCMBuh gnUdFZzQjp/yR3gXraiJy05bBm00hGkjiuHFpMUTFOAakuc4kXnB2ZmvMVUCk6k4rXiL fs+WUo3uPwJgaaTXnC6izf2zVXxuaa077G1JnkfgJQvDL52fOQESufdlHTgs5HeVq8iA Gpb2c3yc6CdSaPuorB91mCAu3qunr2QJgF89FbYus/aj3KCSIKrY4ZX8eLSqbfHl9YtC 3D3A== X-Gm-Message-State: APf1xPBxMOQJqKUGNtEiL3rrTSHv85Sc2PxNoTK7uWQWkb8IffIXTCIb FHRpDvKXcJP2I7naZhiiV7SXbP0i X-Google-Smtp-Source: AH8x226rXj6T2iKicbVs4IZH9T4uBL6BHOMIJZu8ywG8Ze68AJcgSP2MZkxhWY75vcE1wZcOZDvnNg== X-Received: by 10.25.92.1 with SMTP id q1mr7483962lfb.126.1518923037645; Sat, 17 Feb 2018 19:03:57 -0800 (PST) Received: from mail-lf0-f48.google.com (mail-lf0-f48.google.com. [209.85.215.48]) by smtp.gmail.com with ESMTPSA id n2sm2573824lja.21.2018.02.17.19.03.57 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sat, 17 Feb 2018 19:03:57 -0800 (PST) Received: by mail-lf0-f48.google.com with SMTP id l191so8836028lfe.1; Sat, 17 Feb 2018 19:03:57 -0800 (PST) X-Received: by 10.46.64.203 with SMTP id r72mr7641272lje.38.1518923037300; Sat, 17 Feb 2018 19:03:57 -0800 (PST) MIME-Version: 1.0 Received: by 10.46.106.8 with HTTP; Sat, 17 Feb 2018 19:03:36 -0800 (PST) In-Reply-To: References: <201802180135.w1I1ZkcF097492@repo.freebsd.org> From: Kyle Evans Date: Sat, 17 Feb 2018 21:03:36 -0600 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: svn commit: r329504 - head/stand/lua To: Conrad Meyer 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 03:04:06 -0000 On Sat, Feb 17, 2018 at 8:53 PM, Conrad Meyer wrote: > 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 oper= ators. > >> - Test against 'nil' explicitly rather than relying on 'not' for thing= s 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.) I'm definitely not stuck on the idea of parentheses around conditionals, but it was inconsistently done before and I wanted to make some effort to move one way or the other. I started learning lua here [1] and therefore hold no strong position or prior knowledge, so if no-parentheses is the Lua way then I'm all aboard. =3D) [1] https://svnweb.freebsd.org/base?view=3Drevision&revision=3D329274