Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 19 Feb 2018 16:08:58 -0600
From:      Kyle Evans <kevans@freebsd.org>
To:        Alexander Nasonov <alnsn@yandex.ru>
Cc:        src-committers <src-committers@freebsd.org>, svn-src-all@freebsd.org,  svn-src-head@freebsd.org
Subject:   Re: svn commit: r329585 - head/stand/lua
Message-ID:  <CACNAnaFB5jDp7rJFLNR6bzmhu0F8RGZNeaRQsAprxsF67L64Lw@mail.gmail.com>
In-Reply-To: <20180219215453.GA10409@neva>
References:  <201802191634.w1JGYNAE003191@repo.freebsd.org> <20180219215453.GA10409@neva>

next in thread | previous in thread | raw e-mail | index | archive | help
On Mon, Feb 19, 2018 at 3:54 PM, Alexander Nasonov <alnsn@yandex.ru> 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.



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?CACNAnaFB5jDp7rJFLNR6bzmhu0F8RGZNeaRQsAprxsF67L64Lw>