From owner-svn-src-all@freebsd.org Mon Feb 19 22:09:27 2018 Return-Path: Delivered-To: svn-src-all@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 D5FFFF030EC; Mon, 19 Feb 2018 22:09:27 +0000 (UTC) (envelope-from byond.lenox@gmail.com) Received: from mail-lf0-f46.google.com (mail-lf0-f46.google.com [209.85.215.46]) (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 4BBCD6E754; Mon, 19 Feb 2018 22:09:27 +0000 (UTC) (envelope-from byond.lenox@gmail.com) Received: by mail-lf0-f46.google.com with SMTP id v9so1467446lfa.11; Mon, 19 Feb 2018 14:09:27 -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; bh=4PA1VORV5uOfS+aZUqkVnJxBydoKf/Be8fBPyE05NG4=; b=YHWd4aWiFVtGSYv3q2cK+et8Y8Y+bJNUbVNI7j/zU31bZLl8WA+gAucJFkLLuI6Vjd l+50UWd9HqeSClM8P+RuCvGjRZWjQoJD8GcSA76Uf9K9lOTn4CmlUx8bzoS82ySy8XnH afns8c97WzuVFwQ5/npplVbFwLsKFutwc5eKAPQqzzgHURPFDBwdjwYCyJMJLVhR2dbo 8J/UJ+49yQ+3MU0/7iC2YI0F49zh/PyP9atVhWcjov35Hak7kvtuKckEu9za0u6MmRS3 DqIhGjEB4kXzzlCydNQii6yw9Q/lZyZ+8oi1aRBRhTjeIyF3zg4WqtMGKiyvFv8ENoVF ybAQ== X-Gm-Message-State: APf1xPBeS1do4oTa8OanWfhOiTPxIcZSJduMk/2qkKjzD4gCdkjI7zCD r2HH7lC7SpGsi7s/EzxOMXdlECHk X-Google-Smtp-Source: AH8x226p/x+ZLP4xKRqFWDi+t86AnRavxO1si/L4bA1yOGx7QRRGmzJrD5ys6NuBsJf8NGxNuAJQ2A== X-Received: by 10.25.234.75 with SMTP id i72mr355666lfh.65.1519078159846; Mon, 19 Feb 2018 14:09:19 -0800 (PST) Received: from mail-lf0-f42.google.com (mail-lf0-f42.google.com. [209.85.215.42]) by smtp.gmail.com with ESMTPSA id b82sm2275249lfl.9.2018.02.19.14.09.19 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 19 Feb 2018 14:09:19 -0800 (PST) Received: by mail-lf0-f42.google.com with SMTP id y19so1494124lfd.4; Mon, 19 Feb 2018 14:09:19 -0800 (PST) X-Received: by 10.46.88.84 with SMTP id x20mr11082681ljd.44.1519078159447; Mon, 19 Feb 2018 14:09:19 -0800 (PST) MIME-Version: 1.0 Received: by 10.46.106.8 with HTTP; Mon, 19 Feb 2018 14:08:58 -0800 (PST) In-Reply-To: <20180219215453.GA10409@neva> References: <201802191634.w1JGYNAE003191@repo.freebsd.org> <20180219215453.GA10409@neva> From: Kyle Evans Date: Mon, 19 Feb 2018 16:08:58 -0600 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: svn commit: r329585 - head/stand/lua To: Alexander Nasonov Cc: src-committers , svn-src-all@freebsd.org, svn-src-head@freebsd.org Content-Type: text/plain; charset="UTF-8" X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 19 Feb 2018 22:09:28 -0000 On Mon, Feb 19, 2018 at 3:54 PM, Alexander Nasonov wrote: > Kyle Evans wrote: >> +function core.isSingleUserBoot() >> + local single_user = loader.getenv("boot_single"); >> + return single_user ~= nil and single_user:lower() == "yes"; >> +end > > Just curious, why do you end all lines with semi-colons? It's not very > common in Lua code. > These scripts had a mixture of both styles when I started working on this, and I wanted to make it consistent. I was naturally adding semicolons to most statements as a habit from all of the other C we use, so it was the most natural style for the transition; especially given that it causes no harm. We can always change it later, but it has been kind of a useful style rule in some of the grepping I've done to figure out how we use things. It's an easy way to separate things out, since our general rule disallows semicolons after "end" and we of course don't use it for 'if' statements and some other odds and ends.