Chapter 2Ruby.new
Many books on programming languages look about the same. They start with chapters on basic types: integers, strings, and so on. Then they look at expressions like 2 + 3 before moving on to if and while statements and loops. Then, perhaps around Chapter 7 or 8, they’ll start mentioning classes. We find that somewhat tedious.
Instead, when we designed this book, we had a grand plan. We wanted to document the language from the top down, starting with classes and objects and ending with the nitty-gritty syntax details. It seemed like a good idea at the time. After all, most everything in Ruby is an object, so it made sense to talk about objects first.
Or so we thought.
Unfortunately, it turns out to be difficult to describe a language ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access