Dynamic Languages

by Ahmed 21. October 2006 14:56

Ruby & Phyton are just some of the dynamic languages that I've been hearing about quite a bit lately. The first time I heard of the benefits of a dynamic language I thought to myself whether this breed of languages was going to be the next big thing or if the hype will just die down in a statically typed world. It seems like dynamic languages do have quite a bit to offer if you look at it from a "Developer cycles Vs CPU cycles" point of view. For example, one of the things about Ruby is that it reduces line noise. This can be a good thing when all you want to do is try to solve the problem at hand as opposed to going by the book. On the flip side, it helps for the compiler to point out various issues before hand which comes at the cost of line noise. I myself have very little experience with dynamic languages but I did try to play around with Ruby a little bit. Some of the things I came across did seem very interesting/useful e.g. creating a class Song with 3 read-only properties name, artist and duration could be written like this:

class Song

    attr_reader :name, :artist, :duration

end

Any VB or C# develper will probably realize that to do the same (simple) thing would require a little more effort. At the same time there is some ambiguity to the above code as to the types of each attribute which is something that I hear people complain about dynamic languages.

In the real world, one solution never fits all which is why dynamic languages could and should be used in conjunction with static languages. Why not have the best of both worlds? More on this topic here: http://www.iunknown.com/articles/2006/09/06/you-can-have-your-language-cake-and-eat-it-too

Recently, MS has been trying to build support in the CLR to better support dynamic languages which leads me to believe that obviously they see the potential somewhere. IronPython was a big step in this direction and by hiring John Lam now they are certainly moving faster. With support for dynamic languages built into the CLR I am sure the mainstream developers working with VB & C# will be exposed to the features offered by dynamic languages which can potentially lead to more hybrid solutions.
 

Comments are closed