Dynamic languages slowly take over the world. So it seems anyways. I am interested in discovering deeper reasons for this change. I think that Ruby, Python, PHP and JavaScript have their own unique reasons to be admired. What are these reasons? What do we need to consider in order to take the advantage of dynamic languages? What projects are they best for?
Best practices
Do we have best practices for dynamic languages? I was surely the first one to write about JavaScript refactoring in late 2005, while JavaScript was around for ages. Only after using it for 8 years I finally know cases when closures are bad and prototypes are better. It looks like the best practices for dynamic languages are rare. How many people will waste their time walking into the
IDE's and Tools
There has been so much work pumped into Eclipse to allow high developer productivity, effective debugging and refactoring. Do we have these for dynamic languages?
Complexity
Is it true that J2EE is complicated? So is COM/DCOM, CORBA, object databases, etc. How come RubyOnRails persistence is somehow less complex then JDO, Hibernate, or Apache Object Relational Bridge? Can security be simpler in dynamic languages than it is in the .Net runtime?
Processes
Are development processes the same? Is it true that Java J2EE deployment is complicated and
Testing
I think that with PHP the testing is quite difficult. In Java you have to test, since if you discover the bug in the production you will have to redeploy and it takes awhile. With PHP you do not have to test that much, if it broke we can always fix it in production – immediately!
Persistence
A lot of effort went into making Hibernate, Apache Object Relational Bridge and JDO work. Are these efforts obsolete? Can dynamic languages make persistence a breeze? Read Patrick Peak
to for a good scoop.
Threading
Can dynamic languages make writing multi threaded code easier? Can we write high-concurrency applications in dynamic languages? How many concurrent execution threads can we have in a typical dynamic language runtime environment?
PHP Specific
Today, I spoke to my key PHP guy and asked him: You know Java, but why do you prefer to work on PHP projects? This is what he told me:
- Java has too much structure, you have to declare everything, types must match, etc. – I do not need too much structure, it makes me tired, I know what is what
- Java forces you to plan for the future, to consider all kinds of things that can go wrong, in Java you must catch all the errors, etc. – I do not need language to tell me that there might be errors, I know what I am doing and I will craft out a path through the program that has no errors; if there are still errors, I will see them right away in production and will fix them right away, since I do not have to rebuild, recompile and redeploy everything as you do in Java
- PHP is for smaller team (where people somehow do not interfere with each other), the language must be more verbose to support large team; this is why we have Java for large projects
So for the move towards PHP it might be its ability to change source and immediately see the results...
Ruby Specific
todo
RubyOnRails specific
todo
Python specific
todo, mention Zope experiences
JavaScript specific
The story of JavaScript is quite simple. It was only one language that was supported in the IE and Netscape browsers. So people simply had to use it, no other choice. The prototype-based inheritance is quite unique even today and gives trouble to many people.
On the other hand, it feels a lot like C, C++, and Java in syntax so it is easy to learn. It is quite capable and supports dynamic typing, curried functions, closures, lambda, eval. Recently we have been given a debugger and a profiler for it. Firefox browser (and IE to some extent) allows plugins that have access to JavaScript runtime and can inspect/modify the code. Rhino is available for the Java interop.
Notably, Macromedia very effectively took it and added with it the programmability to Flash. The Action Script is JavaScript thus Macromedia did not need to retrain web developers in another language.
No comments yet
Leave a comment