Ruby vs Python

Source: Internet
Author: User
Tags ruby on rails

Python and Ruby are currently very popular.Programming Language. They are ideal for building software prototypes. These two languages are also suitable for developing web applications.Program. The latest Ruby version is 1.9.2, and the latest Python version is 3.1.2.

 

Design Philosophy

Python is designed to improve program readability and programmer efficiency. Ruby emphasizes more programming fun for programmers. At the same time, Ruby can often solve the same problem in different ways. This is also because many methods may have different names in ruby. Python is totally opposed to this idea. In python, there should be only one way to solve the problem.

 

Object-oriented support

Both Python and Ruby support oo well.

 

Functional Programming

Both support functional programming. But some people think Ruby is more suitable for functional programming.

 

Running Speed

If we simply compare the two language runtime environments, we can say that their runtime speed is very similar. If you require a high speed, you can use some third-party frameworks, such as cython and Pyrex.

 

Audience

On the whole, there are more people using Python than Ruby. However, over the past few years, with the widespread use of Ruby on Rails frameworks, the use of Ruby has grown rapidly.

 

Encoding Style

Ruby sets allCodeAll are placed in blocks, and all blocks are ended with "end. Python code is very sensitive to indentation.

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.