Dynamic Programming Languages blossom everywhere: Analysis of mainstream Ruby

Source: Internet
Author: User

BKJIA exclusive Article] With the rapid development of computers, more and more programming languages have emerged. In the past 10 years, due to the speed of development, Java has become the leader in programming languages. As Java continues to become bloated and complex, developers are constantly looking for new languages. Due to the recent trend of dynamic languages, Ruby is favored by developers as an interpreted object-oriented language with dynamic types. The age of the revolution has ended. Ruby has matured into the mainstream programming language since 1995, at least the mainstream is moving forward to Ruby.

Of course, in this age of biased language wars, it may be a meaningless competition, which cannot be avoided by any language. From the complexity issue, why is it popular with developers? First, let's start with a vote in a programming language initiated by Zhang's blog.

 

From the vote of 2983 people, we can see that only 96 people think Ruby will die, which is also the least of the programming languages above. In foreign countries, Ruby is already the mainstream programming language. Ruby's development philosophy is that there can be more than one way to solve the problem, depending on the programmer's preferences.

Sara Mei, an independent developer in San Francisco, has been developing a large number of applications with Ruby. In his opinion, Ruby is a very comfortable programming language, it has many powerful metaprogramming functions.

Why should we choose Ruby instead of PHP or Python?

 
Figure Tianyi Ruby popularity Trend]

From the picture, we can see that Ruby has been paying more and more attention to Ruby since, and Renee has made a detailed comparison in the udemy blog outside China, it focuses on three of the most popular programming languages today.

Click expand]
 

In terms of availability, Ruby is undoubtedly beyond the two languages of PHP and Python. PHP is a relatively traditional language with weaker availability. Python is relatively better; the advantage of Ruby is that the Code is elegant, powerful, expressive, and highly available.

How can we understand this availability?

Ruby, a historical "person"

Why is Ruby historical? Ruby is a language that draws on its predecessors. It stands on the shoulders of giants and introduces the features of C, C ++, Lisp, Perl, and other languages. Ruby is also a language that supports multiple platforms. Like Java, it can run on Linux and other UNIX variants, Windows platforms, MAC, and BeOS. More importantly, Ruby has no pointers. Similar to Java, it also gave a nasty glance at C ++! Without knowing whether to pursue simplicity and speed, Ruby does not have the headache caused by methods and debugging pointers.

Ruby, with the elegance of women

It is best to use elegance to describe Ruby because it has three features: Concise syntax, strong flexibility, and diversity.

Concise Syntax: a more pure object-oriented language. That is to say, all basic data types including string or integer types are expressed in the form of objects. Many features are refreshing in the Java/C ++ world;

Strong flexibility: such as module mixing, block, open class definitions, and existing dynamics make them extremely flexible. A wide variety of famous design patterns seem to have lost their meaning in their hands, the flexibility that Java dreamed of was easy in Ruby's hands;

Diversity: Ruby can complete Kornshell and C language. Do you want to quickly write a ten-line hack program to complete one-time tasks or write a wrapper for the legacy code? It's okay to use Ruby. Do you want to write a Web server, CGI, Or chess game? It's okay to use Ruby.

Summary:

Although Python and Ruby are dynamic programming languages in the same era, they are quite different in terms of development syntax and Community style. Of course, from the perspective of their programming philosophy, we can understand that Python focuses on standardization, unified solutions, and indentation constraints, which is conducive to cooperation among many people. Ruby focuses on humanization and reading convenience, there are multiple solutions to the same problem. Too many solutions require the user to exercise their own control capabilities.

If you are focusing on fun and human language, Ruby is undoubtedly the best choice.

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.