svn commit: r329585 - head/stand/lua

Kyle Evans kevans at freebsd.org
Mon Feb 19 22:09:28 UTC 2018


On Mon, Feb 19, 2018 at 3:54 PM, Alexander Nasonov <alnsn at 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.


More information about the svn-src-all mailing list