C++ developers learn Ruby at their own peril. Once they become familiar with this powerfully concise language, they may find returning to C++ a bitter pill to swallow.
by Michael Voss
May 1, 2007
Page 4 of 4
A Summary of Language Features
To summarize, Table 1 presents some of the key features of C++ and Ruby discussed in this article (with Java included for comparison).
Pure (with primitive types)
Single and interfaces
Single and mixins
Method and Operator
Public, protected, private, and friends
Public, protected, package, and private
Public, protected, private (instance)
No (function objects)
Yes, with some limitations (inner classes)
Table 1. A Comparison of Features in C++, Java, and Ruby
Beyond the Basics
Ruby provides many more features and libraries than one article can cover, but this small sampling should give you some idea about where in your next programming project it would be useful. There are many excellent resources available for learning more about this powerful, concise programming language. The best places to start are at Ruby-Lang.org and Ruby-Doc.org.
Michael Voss is a Senior Staff Software Engineer at Intel Corp. Voss received his Ph.D. in Electrical Engineering from Purdue University in 2001. He is currently a Senior Staff Software Engineer in the Performance Analysis and Threading Lab at Intel and an adjunct Professor in the Edward S. Rogers Sr. Department of Electrical and Computer Engineering at the University of Toronto. His interests include parallel programming and optimizing compilers.