lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]


On Sun, Dec 3, 2017 at 5:35 AM, Hisham <h@hisham.hm> wrote:
> On 30 November 2017 at 05:48, Paige DePol <lual@serfnet.org> wrote:
>> What standards for code width and comments styles do you all use?
>
> In my own projects, I never use an arbitrary number for code width,
> for reasons I described here [1]:
>
> "There are no hard or soft limits on line lengths. Line lengths are
> naturally limited by using one statement per line. If that still
> produces lines that are too long (e.g. an expression that produces a
> line over 256-characters long, for example), this means the expression
> is too complex and would do better split into subexpressions with
> reasonable names.
>
> Rationale: No one works on VT100 terminals anymore. If line lengths
> are a proxy for code complexity, we should address code complexity
> instead of using line breaks to fit mind-bending statements over
> multiple lines."
>
> [1] https://github.com/luarocks/lua-style-guide#line-lengths
>
> -- Hisham
>

Of course, if you talk to someone else, line COUNTS are a proxy for
code complexity...

/s/ Adam