1.2. Basic Ruby Syntax and Semantics

In the previous pages, we have already seen that Ruby is a pure, dynamic, OOP language.

Let’s look briefly at some other attributes before summarizing the syntax and semantics.

Ruby is an agile language. It is “malleable” and encourages frequent, easy refactoring.

Ruby is an interpreted language. Of course, there may be later implementations of a Ruby compiler for performance reasons, but we maintain that an interpreter yields great benefits not only in rapid prototyping but also in the shortening of the development cycle overall.

Ruby is an expression-oriented language. Why use a statement when an expression will do? This means, for instance, that code becomes more compact as the common parts are factored ...

Get The Ruby Way: Solutions and Techniques in Ruby Programming, Second Edition now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.