lua-users home
lua-l archive

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


On Thu, 2011-03-31 at 10:00 +0200, Axel Kittenberger wrote:
> Otherwise if you make a tight binded library. Go with the syntax of
> the library. A negative example is javascript/css. The constant
> convertions between hypen-seperated-syntax and camelCase are not only
> CPU-expensive but also inconsistent. However, in my opinion, too many
> "bindings" libraries are just that, one to one relationship. Instead
> of providing a more Luaish interface. In that case the Luaish
> interface can have different style. Positive example: LuaSocket.

Sometimes, you have no choice with the convention, and have to stick to
the convention of the bounded library. In lqt, we simply went with the
original camelCase of Qt. This has several advantages:

* no need for case conversion (compile-time or 'mental')
* it's natural to those that already used Qt
* it's easy to look up the methods in Qt documentation
* you can differentiate 'Lua code' and 'Qt code'