Affichage des articles dont le libellé est programming. Afficher tous les articles
Affichage des articles dont le libellé est programming. Afficher tous les articles

jeudi 25 juillet 2013

The interpreted language trap


This is a small rant about programming languages.

Scripting languages are quite popular these days, and for a reason : changes you make to the source are reflected instantly, speeding up the development process; and thanks to Moore's law the performance hit does not matter as much as it used to.

But, it's a trap! The reason those should be avoided is because of code rot.
As the runtime depends on loading order, previous instructions, etc.; IDEs cannot reliably determine the type of an object or lookup references to it - unless, precisely, you are debugging..
IDEs (all I know of) cannot refactor reliably scripts.

It means that any change that will be made must be tested and validated under real-usage conditions, which makes people reluctant to make cosmetic changes : variable renaming, unused function removal, ...

So generations of programmers come and go. Codebase grows but never shrinks. Up to the point it becomes unusable and has to be rewritten/replaced! It is like a garden : unattended for too long, it cannot return to the pretty lawn state.
I have experience this several times with different scripting languages : PHP,  bash,  javascript, JSP EL, python... it all ends the same way. Even worse if the script does not output to the programmer but to the user, because there is a chance the programmer will never know what went wrong and since when.

So, if you happen to program and read this, do yourself (or your sucessors) a favour, and stay away from languages which sources you cannot easily refactor!