On 15.06.2007 14:04, Bill M. wrote:
The concept of Dynamically Typed Languages has peaked my interest.
However, I have spent sometime trying to find what problem they exactly
solve. Can anyone tell me:
- What problems do dynamically typed languages such as Ruby solve?
- What is the business proposition for using a dynamic language such as
Ruby over Java / C#?
- What kinds of things can be better with dynamic languages such as
Robert K. wrote:
Development with Ruby tends to be faster. I am not sure though whether
that is related to the clean syntax and powerful functionality or to
dynamic nature. It probably all plays a role…
Definitely faster. As Robert K. says, it all plays a role.
Even the fact that Ruby is an interpreted language vs. Java and C#
being compiled languages plays a role. In compiled languages your
development cycle goes:
while in interpreted languages it goes like this:
which tends to be faster, particularly in the early / exploratory
stages of development - it lets you try out more alternatives in the
same amount of time - so you have a better chance of coming up with a
better design or you can use this benefit to refactor your code more
to make it better (sooner).
To be fair, though, compiled (and therefore statically type-checked
languages) do have some advantages - certain kinds of errors tend to
be caught earlier, at compile time, particularly those due to using
incompatible types, method calls that don’t match the signature of the
method definition, etc. But its a bit of a moot point as to whether
either kind of language is better in absolute terms in this regard -
you’ll find plenty of opinions in both camps. (If you Google enough
you’ll get to read plenty of discussions on this …). Also the topic
is too big to be fully covered in a few posts …
Best thing to do is to try Ruby out and see if it works well for you.