NAME
ruby - Interpreted object-oriented scripting language
DESCRIPTION
Ruby is an interpreted scripting language for quick and easy object-
oriented programming. It has many features to process text files and
to do system management tasks (as in Perl). It is simple, straight-
forward, and extensible.
If you want a language for easy object-oriented programming, or you
don't like the Perl ugliness, or you do like the concept of LISP, but
don't like too many parentheses, Ruby may be the language of your
choice.
FEATURES
Ruby's features are as follows:
Interpretive
Ruby is an interpreted language, so you don't have to recom-
pile programs written in Ruby to execute them.
Variables have no type (dynamic typing)
Variables in Ruby can contain data of any type. You don't
have to worry about variable typing. Consequently, it has a
weaker compile time check.
No declaration needed
You can use variables in your Ruby programs without any decla-
rations. Variable names denote their scope, local, global,
instance, etc.
Simple syntax
Ruby has a simple syntax influenced slightly from Eiffel.
No user-level memory management
Ruby has automatic memory management. Objects no longer ref-
erenced from anywhere are automatically collected by the
garbage collector built into the interpreter.
Everything is an object
Ruby is the purely object-oriented language, and was so since
its creation. Even such basic data as integers are seen as
objects.
Class, inheritance, and methods
Of course, as an object-oriented language, Ruby has such basic
features like classes, inheritance, and methods.
Singleton methods
Ruby has the ability to define methods for certain objects.
For example, you can define a press-button action for certain
widget by defining a singleton method for the button. Or, you
can make up your own prototype based object system using sin-
gleton methods, if you want to.
Mix-in by modules
Ruby intentionally does not have the multiple inheritance as
it is a source of confusion. Instead, Ruby has the ability to
share implementations across the inheritance tree. This is
often called `Mix-in'.
Iterators
Ruby has iterators for loop abstraction.
Closures
In Ruby, you can objectify the procedure.
Text processing and regular expression
Ruby has a bunch of text processing features like in Perl.
Bignums
With built-in bignums, you can for example calculate facto-
rial(400).
Exception handling
As in Java(tm).
Direct access to the OS
Ruby can use most UNIX system calls, often used in system pro-
gramming.
Dynamic loading
On most UNIX systems, you can load object files into the Ruby
interpreter on-the-fly.
|