lua-users home
lua-l archive

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


On Fri, Jul 2, 2010 at 11:59 PM, fernando <fernando@develcuy.com> wrote:
> David, When working on nutria project I was in troubles about applying which coding
> standard to lua, because, AFAIK there is no official choice. So I have
> decided to use a Drupal Conding Standards:... http://gitorious.org/nutria

Fernando, those look reasonable and incidentally are very close to the
Lua coding style I use, which was taken mainly from the Lua Reference
Manual and style guides in other languages (not specifically PHP
though).  I was going to say "[global variables] should start with a
single underscore followed by the module/theme name and another
underscore" conflicts with Lua Reference Manual [1], but it doesn't.
There are Lua-isms missing from the Drupal coding standard too--e.g.
require "foo" v.s. require("foo") v.s. require [[foo]]. Also, an
attempt at a Lua style guide from a few years back is in [2].

[1] http://www.lua.org/manual/5.1/manual.html#2.1 .
[2] http://lua-users.org/wiki/LuaStyleGuide