Friday, November 2, 2012

What is Ruby?

Ruby is unique among object-oriented scripting languages. In a sense, it's a purist's language for those who love object-oriented languages. Everything, without exception, is automatically an object, whereas in other programming languages this isn't true.
What is an object? Well, in a sense you can think of it in terms of building a car. If you have a blueprint for it, then an object is what's built from that blueprint. It contains all the attributes that the object holds (i.e. make, model, color) and the actions it can perform. But, even as a pure object-oriented language, Ruby doesn't sacrifice any usability or flexibility by leaving out features that aren't expressly related to object-oriented programming.
Ruby's architect Yukihiro Matsumoto (known simply as "Matz" on the web) designed the language to be simple enough for beginning programmers to use while also powerful enough for experienced programmers to have all the tools they'd need. It sounds contradictory, but this dichotomy is owed to Ruby's pure object-oriented design and Matz's careful selection of features from other languages such as Perl, Smalltalk and Lisp.
There are libraries for building all types of applications with Ruby: XML parsers, GUI bindings, networking protocols, game libraries and more. Ruby programmers also have access to the powerful RubyGems program. Comparable to Perl's CPAN, RubyGems makes it easy to import other programmers' libraries into your own programs.

No comments:

Post a Comment