The tradeoffs between static and dynamic typing should not primarily be seen as relating to performance. While the fastest statically typed languages tend to be faster than the fastest dynamically typed languages the correlation isn't quite that simple.
It also should not be seen as a religious debate, though I know it often is. No matter which you prefer, it's unlikely that your position in the afterlife is going to be determined by whether you used static or dynamic typing or how many people you "converted" to your point of view.
The trade-offs should be seen in terms of the gains you get from having the proofs that a type system offers vs the costs of achieving those proofs in terms of effort and loss of language features.
Scala tries to increase the gains by improving the type system and lower the effort by having type inference while adding some features (implicits, structural typing) to balance out the loss of dynamic features.
Languages like Ruby try to make up for the loss of proofs by adding incredibly powerful metaprogramming features.
Hybrid typed languages like Groovy attempt to straddle the fence a bit.
Which is right for you, your team, your project, and your organization is a matter of weighing the tradeoffs.
I'm also wrestling with why Scala is a language for rocket scientists. It's very easy to "write Java in Scala." If you know Java then about 30 minutes of syntax relearning will get you productive in Scala. Then you can learn about its more powerful aspects as time goes on. From that point of view, it would seem to share similarity with Groovy. In fact, though Groovy's core syntax is admittedly a bit closer to Java's, Scala's core semantics are closer.
re:
Posted by
ceperez
at
2008-02-02 04:04 AM
Scala is for rocket scientists because with sufficient creativity you can create Scala statements that are incompressible. Check this library out: http://wiki.workingmouse.com/index.php/Scalaz and tell me if the average developer is even remotely close to understanding it.
It also should not be seen as a religious debate, though I know it often is. No matter which you prefer, it's unlikely that your position in the afterlife is going to be determined by whether you used static or dynamic typing or how many people you "converted" to your point of view.
The trade-offs should be seen in terms of the gains you get from having the proofs that a type system offers vs the costs of achieving those proofs in terms of effort and loss of language features.
Scala tries to increase the gains by improving the type system and lower the effort by having type inference while adding some features (implicits, structural typing) to balance out the loss of dynamic features.
Languages like Ruby try to make up for the loss of proofs by adding incredibly powerful metaprogramming features.
Hybrid typed languages like Groovy attempt to straddle the fence a bit.
Which is right for you, your team, your project, and your organization is a matter of weighing the tradeoffs.
I'm also wrestling with why Scala is a language for rocket scientists. It's very easy to "write Java in Scala." If you know Java then about 30 minutes of syntax relearning will get you productive in Scala. Then you can learn about its more powerful aspects as time goes on. From that point of view, it would seem to share similarity with Groovy. In fact, though Groovy's core syntax is admittedly a bit closer to Java's, Scala's core semantics are closer.