lua-users home
lua-l archive

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


On 01/07/2014 17:47, Aaron B. wrote:
Marc Balmer <marc@msys.ch> wrote:
Our own software proves him wrong.  Dynamic languages are very well manageable, also with large codebases.

Agreed.

I've personally seen large Perl codebases that stayed clean, and large
C# projects that were unmanageable bowls of spaghetti. I always believed
it was more about the displine of the programming team to adhere to
best practices and do things right, as opposed to the language they were
working in.

The author doesn't say it is impossible to maintain a large codebase in dynamic languages. He says that it is harder than with a static language.

Indeed, at work, we have a very large Java codebase that grew organically without much discipline, that is nearly impossible to maintain cleanly (very little unit tests because the code mixes everything).

In a new side project, we try to keep higher standards in unit testing, clean coding, separating view from logic, etc. We write it in GWT, partly because the shop is familiar with Java, partly because writing this directly in JavaScript would be a mess. Perhaps not necessarily because of the language itself (although, as pointed out in the article, JS wasn't designed to make lot of code, even if the trend is different today); but as you point out, it is too easy to make big mistakes when writing JS, quickly leading to memory leaks. Or unexpected runtime errors, the kind of things we prefer to discover ourselves (preferably from the compiler or tools like FindBugs) rather than on the client' site...

One advantage of static languages is the static analysis capability: if you have a method named clear() in a class, you can rename it quickly, changing only the relevant call sites, leaving unchanged all the other clear() methods in different classes. If you change the type of a parameter, and forget to change a call, the compiler will bark at you.

Somehow, to keep quality, either you have a static language with good tools maintaining discipline even in an average level team (quite common...); or you have a dynamic language requiring to have a highly disciplined and competent team, with rules to enforce manually what compilers and tools enforce naturally on static languages.

But, of course, competence and discipline is needed in all cases.

I appreciate more modern languages like Dart or Ceylon, offering (more or less) strong type checking, tools, etc. while being more flexible and expressive than good old Java, with functions being first-class citizens, accessors being implicit (no get / set ceremony), elegant constructors, etc. Giving some advantages of dynamic languages, while keeping the strictness of the design.

--
Philippe Lhoste
--  (near) Paris -- France
--  http://Phi.Lho.free.fr
--  --  --  --  --  --  --  --  --  --  --  --  --  --