Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Why would one want to use ruby over python or vice versa?

I wanted to know, while deciding which language or technology to use for implementing an idea; a design, what are the factors involved in making a decision? Specifically talking about popular scripting languages, why would one choose to use ruby over python or perl or vice-versa? All these scripting languages have proved their worth, so how does one decide?

like image 940
Chirantan Avatar asked Dec 18 '08 06:12

Chirantan


People also ask

Why do we prefer Ruby over Python?

Python is generally better for educational use or for people who want to build quick programs rather than work as developers, while Ruby is better for commercial web applications. There are more specific differences when comparing Ruby versus Python, and they have in common that there are many ways to learn both.

Is Ruby more efficient than Python?

There is a perception that Python is faster than Ruby, and this has often led teams to prefer it over Ruby for web development. The Ruby community is painfully aware of this, and Ruby has gotten way faster over the years. Now, in benchmarks, Ruby performs just about as well as Python, if not better.

For what purpose Ruby language is used?

Although Ruby is probably most famous for its use in web development, it has many other uses, too. Some of these include automation, command-line tools, static site generation, DevOps, web scraping, and data processing. Perhaps most importantly, Ruby is a highly versatile and portable language.

Is Ruby better than Python for web development?

If you just want to stick with web development Ruby is your best choice. But if you have in mind to add other features to your web application, like machine learning or other computer science areas, Python is the most suitable as it has libraries that support other fields.


2 Answers

I just came across this comparison, b/w Ruby and Python, which is in terms of performance and memory management.

A fair comparison can be found here. Further, I tend to agree with all the three answers above.

like image 60
Adeel Ansari Avatar answered Sep 18 '22 09:09

Adeel Ansari


Besides any hype that one language receives and the other doesn't, I think two factors play a role: mastership of the language, and availability of libraries. If you know Ruby already, you are more likely to use it again, and also to recommend it when asked; likewise for Python. Wrt. libraries: if you want to use Ruby-on-Rails (which you may have chosen for some reason), you have to use Ruby; likewise, if you want to use Django, you have to use Python. Etc.

like image 31
Martin v. Löwis Avatar answered Sep 19 '22 09:09

Martin v. Löwis