Introducing Ruby

[ LiB ]

Introducing Ruby

Ruby is considered a pure, modern, object-oriented language. Figure 1.7 shows how Ruby combined elements of Smalltalk and Eiffel. It sports a simple syntax inspired by Perl and Ada and is considered very readable, easy to maintainable , and clean, with only a few special syntactical situations. Ruby is highly portable and runs on UNIX, Max, Windows, DOS, OSX, and Amiga platforms.

Figure 1.7. The Ruby language family tree

graphic/01fig07.gif


Ruby Features

Ruby was created by Yukihiro Matsumoto in 1993. The language is open source, and its use is covered under the GPL artistic license. Matz, as he is affectionately known, knew Python, but he didn't like it because it wasn't pure OOP. He wanted a genuine OOP scripting language that was easy to use and write. Ruby's name , however, is a takeoff on Perl and is named after a colleague's birthstone.

Ruby feature highlights include:

  • Pure OOP. Every bit of data in Ruby is an object, even basic types. There are no Ruby functions, only method calls (every function is a method). Unified class/type hierarchy, metaclasses, and the ability to subclass everything. There is also only single inheritance.

  • Dynamic loading.

  • Exception handling.

  • Automatic garbage collection.

[ LiB ]


Game Programming with Pyton, Lua and Ruby
Game Programming with Pyton, Lua and Ruby
ISBN: N/A
EAN: N/A
Year: 2005
Pages: 133

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net