The Versatility and Simplicity of Ruby Programming Language

02 Sep 2016
0 Comments
The Versatility and Simplicity of Ruby Programming Language

Combining Perl-inspired syntax with features like those of Smalltalk, Ruby is a dynamic, reflective, general purpose object-oriented scripting language. It was developed and designed on February 24, 1993 by Yukihiro "Matz" Matsumoto in Japan. Perl, Smalltalk, Eiffel, Ada, and Lisp are the languages that it is based on.

Including object oriented, functional, reflective, and imperative, multiple programming paradigms are supported by the script. Moreover, it has an automatic memory management and dynamic type system, which makes it analogous to CLU, Perl, Python, Dylan, and Lisp in varying respects.

C was used to write the implementation of the standard 1.8.7, as a single-pass interpreted language. At present, no specification of the language exists, and hence the de facto reference is its original implementation. As of 2008, several of its alternative implementations have arrived including YARV, JRuby, Rubinius, IronRuby, and MacRuby. Each of its alternatives takes a special approach while just-in-time compilation is provided by JRuby and IronRuby. YARV is used by the official 1.9 branch. Version 2.0 which is in development is said to be using this also and is said to be finally superseding the slower MRI of the language.

The concept that gave birth to the script was that there got to be a scripting language that balances functional programming with imperative programming. According to the designer and developer, Yukihiro, a scripting language that was more object-oriented than Python and more powerful than Perl was what he was looking for. And so he ended up creating the script. Yukihiro has stated that he designed the language from programmers' point of view as he believes that systems design should give emphasis to human needs more than computer needs. So, he followed the principles of good user interface design, and as a result it not only enhances a programmer's productivity, but most programmers find working with it a fun, cool thing.

Rumor has it that Ruby follows the principle of least surprise (POLS) - the language behavior that minimizes confusion for experienced users. However, in a May 2005 discussion on the comp.lang.ruby newsgroup, Yukihiro tried to detach the script from POLS. Besides, he has stated that he had not applied the principle of least surprise to the design of the script. In spite of this, the script seems to be believed following POLS among some programmers.

Features of Ruby:

Following are the features of the script:

  • Object-oriented
  • DLL/Shared library dynamic loading on most platforms
  • Six levels of variable scope
  • global
  • class
  • class instance
  • instance
  • local
  • block
  • Exception management
  • Methods can be called without parentheses, making Ruby trendy for putting into operation Domain Specific Languages
  • Automatic garbage assembling
  • Iterators and conclusions
  • Indigenous, Perl-like standard terminology at the language level
  • Operative overfilling
  • Greatly portable
  • Two-way multi-threading on all platforms by means of green threads
  • Introspection, reflection and meta-programming
  • Big standard library
  • Sustains reliance injection
  • Sustains object runtime modification




Leave a comment: