On Sat, Feb 17, 2018 at 5:35 PM, Kyle Evans <kev...@freebsd.org> 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 operators. > - 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 — it suggests treating nil as boolean false, which I agree is probably wrong.) Best, Conrad _______________________________________________ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"