lua-users home
lua-l archive

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

On 6/8/2017 11:50 AM, Daurnimator wrote:
On 7 June 2017 at 01:41, Russell Haley wrote:
I am biased, but I find daurnimators code so elegantly simple it 'has no style'.

Learn the principle, abide by the principle,
and dissolve the principle.*
                                -- Bruce Lee

I wouldn't say it has no style though: my coding style has evolved
over the years.
Back in 2008ish I wrote this up about my coding style at the time:
However much of my preferences have now changed.

If I thought anyone would read+follow a coding style guide, I might
keep one updated. But I've learnt that no one *does* read them: it's
more practical to have a "house style" for a project, and catch
anything that deviates in a pull request.
The only time a guide works is when they have tooling to enforce it:
however for such a tool to be useful (no one agrees on style!) it has
to be tremendously configurable.
Even then you have to persuade people to use the tooling (see how
often people use astyle or clang-format).

His books are of course better than a page of quotes. Roughly: First, you learn the forms. Then you master, or internalize the forms. Finally, you break free of the forms when you see fit.

Kein-Hong Man (esq.)
Selangor, Malaysia