lua-users home
lua-l archive

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

Lua makes up the majority of Lightroom's code -- particularly on single platforms since the Objective-C and MFC C++ pieces are platform specific.

The biggest problem with dynamic languages and big projects seems to be refactoring since one cannot simply change a declaration and then fix things until it all compiles again. It's also a bit harder to trace dependencies in object-oriented code since one can send a message to an object without importing anything which defines the message. The work around for those issues is being more disciplined about naming and using search and replace.


On Sep 26, 2009, at 10:24 AM, <> wrote:

---- Wesley Smith <> wrote:
I'd be worried about writing an application that large in a dynamic language. That said, we have incorporated Lua selectively within the app; e.g., custom screens built with our widget editor are saved as Lua tables.

Is this for performance reasons?  For maintainability reasons?

I'd say the primary reason is maintainability. I've never felt entirely comfortable when scripts I write start growing past several thousand lines or so. E.g., for our C++ code we've purchased tools that allow us to visualize function calling hierarchies, class hierarchies, data structure layouts, etc: Helps with understanding and maintaining the code.

With that much code, there is something to be said for static compilation helping to find errors in the code. We can test the app within a debugger, which catches some errors for us.

Don't get me wrong, I'm a big fan of scripting languages and of Lua: I introduced Lua into my organization and continue to push its use. But I remain reluctant to use Lua for really large apps. Is my reluctance misplaced? Have others successfully developed and maintained large 100,000+ line apps in Lua?

Mason Deaver