Saturday, September 14, 2013

Dynamic languages? Be ready for some discipline

Dynamic languages like Python, Ruby or Javascript are truly awesome. The removal of the compilation step make them super useful for quick scripting or prototyping, and that is a huge gain.Dynamic languages allow some features that would simply not be possible with static languages.

By dynamic behavior has a cost, you are scarifying the immense help that the compiler provides to help us dumb engineers all. You can only have piece of mind in and trust in your dynamic code if you really are obsessed with tests (better still with TDD). Dynamic interpreted code only blows up when exercised, there is no compilation step to help here, and you only discover that a Duck is not a duck when at runtime someone passes a Pidgeon.

Long story short, in order to use dynamic languages in large projects, you are going to need a very strong team, really committed to best testing practices, and really into code reviews, otherwise you are putting yourself in a path to sure disaster.

In fairness you can do stupid things in most languages (crazy use of reflection in Java, passing around void pointers in C/C++, etc), but the problem here is that with dynamic languages it is much easier.

"As an engineer use whatever technology suits the needs of the project and the team better." I mean, sometimes Java is better simply because that is what your team has expertise about. Maybe your IT department is a disaster and C/C++ are not even an option because of the lack of management of system libraries in your production boxes. Be smart, inform yourself, gather data, and make and informed decision.

Enjoy.

http://stackoverflow.com/questions/35753/is-python-good-for-big-software-projects-not-web-based