lua-users home
lua-l archive

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


2009/9/27 Petite Abeille <petite.abeille@gmail.com>:
>
> On Sep 27, 2009, at 7:01 PM, Ivan Kolev wrote:
>
>> I think you are quite right. I'm a big fan of Lua too, but I've failed
>> with the first larger project I tried writing completely in Lua (less than
>> 10K lines).
>
> As a counter example, Nanoki, a wiki engine in pure Lua, clocks over 10K
> lines of Lua code and is no more -nor less- buggy than any other piece of
> software of that size.
>
> Clutches such a static typing only catch the most trivial of typos. Anything
> else is solely on your lap. And no amount of paraphernalia is going to save
> you there.
>
> Just my 2¢.

Prosody[1] is almost pure Lua, and I think we clock at about 12K lines
at a simple count excluding blanks. We have no issues with dynamic
typing. In fact I don't see why anyone ever would... it's usually
common sense what kind of value a function expects, and should be
passed.

It should also be noted that similarly-featured XMPP servers in other
languages are at least 5 times the size, Lua makes it really easy to
write neat compact and easy-to-follow code. The power of this in
developing large applications can't be underestimated[2].

We aim to have no single file longer than 200 lines[3], a few of the
complex ones make it up to 400 lines, and 450 is practically a hard
limit for us which indicates something needs breaking up.

More than any of the above, it's a joy to spend my time working in
Lua, on Prosody. Which is more than I can say for e.g. *any* C++
application I have ever worked on.

Matthew

[1] http://prosody.im/
[2] http://www.paulgraham.com/power.html
[3] http://catb.org/esr/writings/taoup/html/ch04s01.html