|
|
|||
Ruby History & InformationRuby, by definition, is a general purpose, dynamic and object oriented programming language. The syntax of Ruby is inspired from Perl. Ruby originally belongs to Japan as it was developed there in the mid 1990s and it was initially developed by Yukihiro Matsumoto. Similar to Perl, Ruby also supports various programming paradigms like object oriented paradigm, procedural paradigm, functional paradigm, reflective paradigm and imperative paradigm.
ah library how i love thee so As mentioned before, Ruby and Perl shares many common features. One such common feature is the automatic memory management which is also provided by other programming languages too like Lisp, Python, and CLU etc. The standard Ruby was originally written in C and it was written in C as an interpreted single pass language. Since there are no specifications of Ruby; that is why the original implementation which was written in C is still considered to be the de facto standard. Recently, in 2008, there are various implementations of Ruby language coming on like JRuby, Rubinius, IronRuby and YARV. Each of these implementations provides different functionalities.
workspace, What does yours look like? Let us now briefly look at the history of this great general purpose and dynamic programming language. Ruby was released for the very first time on 24th Feb, 1993 by Yukihiro Matsumoto. Yukihiro actually wanted to create a fresh programming language that could provide a balance between functional programming and imperative programming. As stated by Yukihiro, he wanted to have a scripting language that is more powerful and useful as compared to Perl and provide more object oriented features as compared to Python. Because of the above two reasons, he developed Ruby. After then, the first publication of Ruby was released with the name of Ruby 0.95 on December 21, 1995. Ruby 1.0 was then released on December 25, 1996 and the process of improving Ruby went on and on. Recently, in June 2008, the latest version of Ruby was released; Ruby 1.8.7. According to Yukihiro, the next stable version of Ruby would be the 1.9.1 which will introduce Block local variables, character encodings and much more. Lets now talk about the basic syntax of Ruby. If you have had the experience of working in other programming languages like Perl or Python, you would agree that the syntax of Ruby is quite similar to that of Perl or Python. However, there are some differences as well between the syntax of Ruby and Perl. For instance, variiables in Perl are not mandatorily prefixed with a sigil as in case of Perl. On the other hand, there are many similarities as well like class definitions or method definitions are signaled using keywords in both Perl and Ruby. At the end, we have presented one of the most simplest examples for any programming language; the hello world example. This example is meant to show you a difference between Ruby and Perl. For instance, if you want to output hello world using Ruby, you have to write the following piece of code Puts “Hello World” Another major difference between Ruby and Perl/Python is that all the instances of any variable are kept completely private to the class only, in case of Ruby which is not the case in Perl or Python. For more details about the syntax and semantics of Ruby programming language, please refer to our section Top 3 Learning Resources for Ruby & Recommended forums for Ruby which will assist you in finding great online learning resources that you can use to learn more about Ruby. |
|||
|
|

Joining XML UK
