Ruby programming language

Ruby is a dynamic, interpreted, high-level programming language. Its creator, Yukihiro Matsumoto (better known as "Matz"), combined elements of his favorite languages (Perl, Smalltalk, Eiffel, Ada, and Lisp) to form a new language in which the functional programming paradigm is balanced with imperative programming principles. Matz often said that he was trying to "make Ruby natural, not simple," a language that reflects life.
Ruby looks simple, but it is very complex inside, like the human body.
The public release took place back in 1995 and attracted the attention of programmers worldwide. Ten years later, it gained mass recognition across the globe. In the largest cities of our planet, conferences dedicated to Ruby are regularly held.
Much of Ruby's growing popularity is attributed to the Ruby on Rails framework – a web application development framework built with Ruby.
Everything in Ruby is an object.
In Ruby, everything is an object. Every piece of information or code can have its own properties and actions defined. In object-oriented programming, properties are called object variables, and actions are called methods. Ruby's pure object-oriented approach can be demonstrated with just a couple of lines of code performing an operation on a number.
Ruby is a very flexible programming language
Ruby is very flexible because it allows users to freely modify its parts. Core parts of Ruby can be removed or redefined at will. Existing components can be modified. Ruby strives not to limit the user in any way.
Blocks — a truly expressive construct
Blocks in Ruby are also an excellent source of flexibility. A programmer can add a closure to any method, defining how that method should behave. A closure is a block, which is one of the most popular constructs for those coming to the Ruby world from imperative programming languages such as PHP or Visual Basic.
Mixins in Ruby
Unlike other object-oriented languages, Ruby deliberately provides only single inheritance. However, Ruby also introduces the concept of modules. Modules are collections of methods. Classes can freely mix in a module and gain access to all of its methods.
The visual representation of Ruby
Since punctuation is rarely used in Ruby, and English words are typically used as keywords, some punctuation marks serve as embellishments in Ruby. Ruby does not require variable declarations. It follows simple naming conventions to distinguish variable scopes.
Other Ruby features
- Ruby has exception handling constructs, similar to Java or Python, making error handling easier;
- Ruby features a true mark-and-sweep garbage collector;
- Ruby can dynamically load external libraries, provided the operating system supports it.
Resources for learning Ruby:
Назад