The shortcomings of scripting

Getting the most from dynamic languages means being mindful of their limitations

While dynamic languages offer undeniable coding benefits, they do have limitations. Managers bringing dynamic languages into the enterprise development mix must bear these shortcomings in mind when matching technologies to specific software projects.

Scalability. Python and Ruby both use their own VMs, neither of which is suited to threading — in fact, they offer little support for it. So, apps that require many parallel threads will not fare well with Python or Ruby. Moreover, hardware resources, such as multiple cores and multiple processors, will not be used efficiently because these VMs are not capable of leveraging this hardware effectively. Because of this, many Ruby enthusiasts are turning to JRuby, a Sun-sponsored open source project for running Ruby on the Java VM, which offers excellent threading support. JRuby is far enough along that it can be used for in-house projects and pilots.

Performance. None of the main dynamic languages uses a VM that has been optimized as extensively as the JVM. As a result, these languages run far more slowly than Java. Other factors, such as language features, also affect performance. The regularly updated language benchmark shootout for the Linux community shows that across an extensive collection of tests, Java runs at 1.8 times the speed of compiled C; Lua (using a JIT compiler), at 3 times; Python, at 6.7 times; PHP, at 7 times; Perl, at 9.8 times; and Ruby, at 16 times. So, where performance is critical, Java or a compiled language will fare far better than any dynamic language (except Lua with a JIT).

Development tools. Developers accustomed to the feature sets of Visual Studio .Net or the leading Java IDEs will be surprised by the lack of equivalent environments for dynamic languages. The best IDE for Perl, Python, and Ruby today is ActiveState’s newly released Komodo IDE 4.0. Komodo’s primary competitors are single-language tools. Worthwhile open source tools for most of these languages do not yet exist, as there is no single equivalent of Eclipse or NetBeans, although both of those environments have plug-ins that support various dynamic languages.

Developer communities. Although premier dynamic languages such as Perl, Python, and Ruby have active, thriving communities, none approaches the size of those for mainstream languages such as C, C++, and Java. Only PHP comes close. These smaller communities mean a smaller pool of developers to draw from when hiring for specific language skills. Fortunately, dynamic languages are generally easier to learn. As such, in-house staff can be cross-trained fairly quickly. And although they won’t be experts overnight, newly trained staff can contribute right away, thanks to the innate productivity of the languages.

Join the discussion
Be the first to comment on this article. Our Commenting Policies