RUBY PROGRAMMING LANGUAGE


RUBY
:

           Ruby is a pure Object-Oriented language developed by Yukihiro Matsumoto (also known as Matz in the Ruby community) in the mid 1990’s in Japan. Everything in Ruby is an object except the blocks but there are replacements too for it i.e procs and lambda. The objective of Ruby’s development was to make it act as a sensible buffer between human programmers and the underlying computing machinery. Ruby has similar syntax to that of many programming languages like C and Java, so it is easy for Java and C programmers to learn. It supports mostly all the platforms like Windows, Mac, Linux.


 Programming in Ruby:
To program in Ruby is easy to learn because of its similar syntax to already widely used languages.


Writing program in Ruby:
Programs can be written in Ruby in any of the widely used text editors like Notepad++, gedit etc. After writing the programs save the file with the extension .rb

Let’s see some basic points of programming:
Comments: To add single line comments in Ruby Program, # (hash) is used.

Syntax:

# Comment

Advantages of Ruby:

  • The code written in Ruby is small, elegant and powerful as it has fewer number of lines of code.
  • Ruby allows simple and fast creation of Web application which results in less hard work.
  • As Ruby is free of charge that is Ruby is free to copy, use, modify, it allow programmers to make necessary changes as and when required.
  • Ruby is a dynamic programming language due to which there is no tough rules on how to built in features and it is very close to spoken languages.

Disadvantages of Ruby:

  • Ruby is fairly new and has its own unique coding language which makes it difficult for the programmers to code in it right away but after some practice its easy to use. Many programmers prefer to stick to what they already know and can develop.
  • The code written in Ruby is harder to debug, since most of the time it generates at runtime, so it becomes difficult to read while debugging.
  • Ruby does not have a plenty of informational resources as compared to other programming languages.
  • Ruby is an interpreted scripting language, the scripting languages are usually slower than compiled languages therefore, Ruby is slower than many other languages.

Comments

Popular Posts