python and ruby - for what to use it?

They are good for mostly for rapid prototyping, quick development, dynamic programs, web applications and scripts. They're general purpose languages, so you can use them for pretty much everything you want. You'll have smaller development times (compared to, say, Java or C++), but worse performance and less static error-checking.

You can also develop desktop apps on them, but there may be some minor complications on shipping (since you'll usually have to ship the interpreter too).

You shouldn't do critical code or heavy computations on them - if you need these things, make them on a faster language (like C) and make a binding for the code. I believe Python is better for this than Ruby, but I could be wrong. (OTOH, Ruby has a stronger metaprogramming)


If you want to know what people actually use them for, check out Python Package Index, RubyForge, and search SourceForge or even StackOverflow.

As shylent says, you can easily get into holy wars about what they should be used for. Both Ruby and Python are popular especially for prototyping, but you can also build production software like Ruby on Rails, Zope, and Mercurial.

What one would not use them for is code that is performance-critical (most isn't) or close to the metal.


They are good for everything.

Ruby has an edge for munging textfiles awk/perl style. That's slightly easier in Ruby. For the rest, I think Python has a string edge, and that it TOTALLY subjective. See What does Ruby have that Python doesn't, and vice versa? and the follow-up blogpost http://regebro.wordpress.com/2009/07/12/python-vs-ruby/ .

I use Python for every programming related thing I need to do, and will do that until there is a complete shift in programming paradigm that kicks OO development into the stoneage.

Tags:

Python

Ruby