A Different World View

 
   

Ruby Way
By Hal Fulton
Slots : 1.0
Table of Contents
 


Ruby can seem very similar to Python. For example, variables are untyped names holding references to typed objects. Exception handling is built-in. Scripting is encouraged for prototypes while programming extensions in C is used for speeding up bottlenecks.

But in fact, there is a different paradigm at work. Guido has said that he took a lot from Modula 3, which would explain why Python is explicitly modular and object-based, whereas Ruby is more integrated and class-basedbut not in the manner of Java, for Ruby is even more dynamic than either Java or Python. It is also more complex, and Ruby has no mission to simplify readability by limiting expressibility. But you may find it easier and more pleasing to work with.

Some terminology may appear the same at first, but is understood differently in the Ruby community. For example, module, namespace, object, method, and iterator have different connotations in Ruby. Try to adjust your mindset from Python's modular object/statement approach to Ruby's integrated class/method approach.


   

 

 



The Ruby Way
The Ruby Way, Second Edition: Solutions and Techniques in Ruby Programming (2nd Edition)
ISBN: 0672328844
EAN: 2147483647
Year: 2000
Pages: 119
Authors: Hal Fulton

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net