views:

74

answers:

2

I have read a few articles on Internet about programming language choice in the enterprise. Recently many dynamic typed languages have been popular, i.e. Ruby, Python, PHP and Erlang. But many enterprises still stay with static typed languages like C, C++, C# and Java.

And yes, one of the benefits of static typed languages is that programming errors are catched earlier, at compile time, rather than at run time. But there are also advantages with dynamic typed languages. (more at Wikipedia)

The main reason why enterprises don't start to use languages like Erlang, Ruby and Python, seem to be the fact that they are dynamic typed. That also seem to be the main reason why people on StackOverflow decide against Erlang. See Why did you decide "against" Erlang.

However, there seem to be a strong criticism against dynamic typing in the enterprises, but I don't really get it why it is that strong.

Really, why is there so much cristicism against dynamic typing in the enterprises? Does it really affect the cost of projects that much, or what? But maybe I'm wrong.

+2  A: 

It's probably more about what people are familiar with than anything else. From a manager's point of view, he/she needs a good reason to use a technology that:

  • May have never been used by the company on a project,
  • No one on the team has any experience with,
  • Does not (appear to) have the backing of a solid "Enterprise" company such as Microsoft, IBM, etc

These factors are especially important if the project needs to be maintained for many years down the road.

I am not defending this point of view, just pointing out that it exists and may be a source of this criticism.

Justin Ethier
+2  A: 

The word "enterprise" doesn't really mean anything to me, so I'm just going to assume you're talking about large corporations.

Dynamic typing is just that: dynamic. There is no way to effectively statically analyze your program with a dynamically-typed language. Static typing allows developers to catch mistakes before ever compiling or running their code, something that is very important in the corporate world. It makes debugging much less of a pain and thus increases overall productivity (or that's what they argue, anyway). Static typing is also very important in a team setting because it allows your IDE to tell you how to use a method that you've never seen. These kinds of "hints" are very difficult, if not impossible, to achieve with dynamically-typed languages.

The other big thing is that dynamic languages are simply not as mature as static languages. Languages like C++, Java, and C# have been in use in the corporate world for years and years and years, whereas dynamically typed languages are just recently coming into play. There is a lot more code written in Java than in Python, and a lot more support for the former as well.


Note that I'm not arguing for either side. I personally prefer dynamically-typed languages because they allow me to write the code much more quickly and spend less time thinking about the problem, but I can see the appeal of languages like C# in a huge corporate environment.

musicfreak