Ruby vs Python advantages and disadvantages, ruby vs python
Ruby and Python are too similar, and most of the trade-offs are personal preferences. For example, I think Python's "There is only one way to do it. "than Ruby's" There are always ways to do it. "Well, it's not just about team collaboration. More importantly, you can quickly understand what code you wrote three months ago without any comments is. Of course, many people think that freedom and flexibility are more important than readability, so I say this is my personal preference.
Objectively speaking, Ruby has the following advantages over Python:
Block should be a cooler part of Ruby than Python in terms of language. There are too many restrictions on lambda functions in Python (BFDL GvR does not recognize many aspects of functional programming ).
On OS X, the most important advantage of Ruby over Python may be the presence of MacRuby (http://www.macruby.org. I am bold enough to guess that MacRuby will become an official language outside Objective-C (if not completely replaced. In addition to convenient and quick Cocoa application creation, MacRuby block makes it easy to use the Grand Central Dispatch of OS X. In the future, MacRuby will support multi-core and hybrid cores (CPU + GPU) application is very important.
Disadvantages:
One of Ruby's major challenges is performance. The official implementation of Ruby 1.9 is inferior to that of CPython. In addition, Python has many ways to multiply performance, such as Numpy, Psyco, PyPy, and Cython. In contrast, Ruby has limited ways to improve performance.
The second major injury to Ruby lies in a third-party package. Ruby has not been popular in the English world for a long time. Most third-party packages are related to the Web, and the number of packages outside the Web field is far smaller than that of Python. Especially in scientific research and other aspects, the difference is very obvious. Many disciplines and fields have mature Python-based applications, and almost cannot find Ruby-related packages. In addition to the historical origins, this is also a more concise syntax with Python (many people who use Python for research are not computer-specialized) and the aforementioned performance multiplier (mainly Numpy and Scipy) there is a close relationship.