Overview on Ruby programming languageRuby is a simple multipurpose Object Oriented scripting language originating from Japan. It was released in 1993 by inventor Yukihiro Matsumoto with the objective of creating a language that can be more potent than Perl and also make better use of OOPs concepts than python does.

 

 

The following content will give an overview on what ruby is, its features and advantages as an object oriented scripting language:

Ruby is an inter platform scripting language actualized with C and based on object oriented programming principles in the stature of perl and python. It has fast and easy application development capacity and can do system management related stuff like perl. Its flexible syntax can easily adapt to both simple and complex application development.

Features and advantages of Ruby

1.  Ruby has exception handling facility like in Java.

2.  It can swiftly load extension libraries provided the OS permits.

3.  It is an Interpreted language and hence execution is immediate as there is no compilation step. This helps faster coding and hence quicker completion of projects, thereby improving the capacity of companies to complete more number of projects at less time.

4.  Uses Object oriented programming concepts like methods, classes, polymorphism, inheritance etc.

5.  It comes with many existing libraries thereby making programming faster and easier.

6.  Ruby is portable – An application developed in ruby can work on all major OSs like Windows, DOS, UNIX, Mac, BeOS etc.

7.  Ruby is extensible. It has a C interface extension API to help developing interfaces from Ruby codes to third party libraries. Ruby also provides special interfaces for Java, perl and python so you can reuse all your old programs.

8.  Ruby needs no variable type declaration unlike Java which needs static variable typing. Java requires declaration of variables as belonging to a particular type. For example, if the variable is going to store a string, it must be declared as a variable of type ‘string’. Also this declaration cant be changed later on. But in ruby, dynamic variable typing is employed; hence it doesn’t need declaration. The Ruby interpreter will dynamically find out the type by examining the data assigned to the variable. Also you can dynamically change the type if you wish.

9.  Ruby uses an automatic mark-and-sweep garbage collector to clear unused memory. Hence you don’t have to waste time explicitly clearing free memory.

10.  Simple syntax: Ruby’s consistency and its object orientated programming principle make its syntax flexible, readable and easy to use. Code in java or c++ can take double the time as the number of lines is double. But in ruby the syntax is very simple. For example, there are no semicolons (see below) :

if c = 0
print M
end

11.  Last but not the least, Ruby is free. It is open source even for commercial purposes.

If you are looking for pure performance, then C or C++ is the best bet. But if you want simplicity and speed of coding, then Ruby is the language to go for. It is an easy OOP language that can help coding that is clear and understandable. Ruby puts together the best aspects of many popular languages. Who knows! Ruby may well compete with Java and C++ as the next industry standard for programming.

Leave a Reply

Your email address will not be published. Required fields are marked *

*

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>