From: matz@... (Yukihiro Matsumoto) Date: 1996-04-23T13:06:57+09:00 Subject: [ruby-list:272] refman in English (preface) まつもと ゆきひろ@トヨタケーラムです. rubyドキュメント英語化計画の一貫として,リファレンスマニュア ルの序文を英語化しました.変な英語だと思いますが,時間があれ ば,ちょっと呼んでみてくださいな.HTMLのままです. -- Ruby Language Reference Manual index - next

Preface

Ruby is the 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 parentheses, ruby may be the language of the choice.

Ruby's features are as follows:

Interpreter

Ruby is the interpreted language, so you don't have to recompile to execute the program written in ruby.

Variables has no type (dynamic typing)

Variables in ruby has no type. You don't have to worry about variable typing. Consequently, it has weaker compile time check.

No declaration needed

You can use variables in your ruby programs without any declarations. Variable name itself denotes its type (local, global, instance, etc.)

Simple syntax

Ruby has simple syntax influenced slightly from Eiffel.

No user-level memory management

Ruby has automatic memory management. Objects no longer referenced are automatically colletcted by the garbage collecter built in the interpreter.

Everything is object

Ruby is the pure object-oriented language from the beginning. Even basic objects like intergers are treated uniformly as objects.

Class, inheritance, methods

Of cource, as a OO language, ruby has basic features like classes, inheritance, methods, etc.

Singleton methods

Ruby has the feature to define methods for cetain specified object. For example, you can define a press-button action for certain GUI button by defining a singleton method for the button. Or, you can make up your own prototype based object system (if you want to).

Mixin by modules

Ruby does not have the multiple inheritance intentionally. IMO, It is the source of confusing. Instead, ruby has modules to share the implementation across the inheritance tree. It is often called "Mixin."

Iterater

Ruby has iteraters for loop anstraction.

Closure

In ruby, you can objectify the procedure.

Text processing and regular expression

Ruby has bunch of text processing features like in perl.

Bignums

With built-in bignums, you can calculate factorial(400), for example.

Exception handling

As in Java(tm).

Direct access to OS

Ruby can call most of system calls on UNIX boxes. It can be used in system programming.

Dynamic loading

You can load object files into ruby interpreter on-the-fly, on most of UNIXes.

index - next

matz@caelum.co.jp