Ruby Nube

B

Bill Man

Hello,

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
Ruby?

Thank you so much for your help. I have been searching the web for a
while and I haven't been able to find anything.
 
R

Robert Klemme

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?

Often scripting languages are dynamically typed, but there are others as
well. I guess Ruby is most widely used for everyday scripting tasks and
web development (Rails). I do believe there is a minority that uses it
successfully for bioinformatics.
- What is the business proposition for using a dynamic language such as
Ruby over Java / C#?

Um, I guess there is a ton of them. Strengths of Ruby are ease and
speed of development. So every use case where that is important might
be a candidate.
- What kinds of things can be better with dynamic languages such as
Ruby?

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 the
dynamic nature. It probably all plays a role...
Thank you so much for your help. I have been searching the web for a
while and I haven't been able to find anything.

How about just trying it out? With many Linux distributions it's just
one more package you have to install, on Windows there is cygwin and the
Windows installer version.

Kind regards

robert
 
J

John Joyce

Hello,

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
Ruby?

Thank you so much for your help. I have been searching the web for a
while and I haven't been able to find anything.
Dynamic typing itself is not such a big deal, but it does mean less
keyboarding, more concise code that is generally more readable.
Dynamic typing allows more duck typing and introspection.
You can try to send a message to an object. If it can do it, it will
try.
But you can actually ask the object if it can do something before
doing it.
Objective-C can also do this because it's got a bit of a runtime
But also, you get (sometimes arbitrary) language rules that can be
useful.
In practice, it just makes some things more convenient with automagic
type conversions.
puts 5
will actually convert the Fixnum 5 to a string for you.
 
R

Robert Klemme

Dynamic typing itself is not such a big deal, but it does mean less
keyboarding, more concise code that is generally more readable.
Dynamic typing allows more duck typing and introspection.
You can try to send a message to an object. If it can do it, it will try.
But you can actually ask the object if it can do something before doing it.
Objective-C can also do this because it's got a bit of a runtime
But also, you get (sometimes arbitrary) language rules that can be useful.
In practice, it just makes some things more convenient with automagic
type conversions.
puts 5
will actually convert the Fixnum 5 to a string for you.

While I agree to the rest I would not attribute this example to dynamic
typing. The same is possible (and is actually used) in Java because
there (similarly to Ruby) toString() is a method of Object (the root
class of the class hierarchy).

Kind regards

robert
 
V

vasudevram

Robert said:
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
the
dynamic nature. It probably all plays a role...

Definitely faster. As Robert Klemme 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:

Edit/Compile/Run/Repeat

while in interpreted languages it goes like this:

Edit/Run/Repeat

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.

Vasudev Ram
http://www.dancingbison.com
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,755
Messages
2,569,536
Members
45,016
Latest member
TatianaCha

Latest Threads

Top