From: "David A. Black" Date: 2009-02-01T12:41:57+09:00 Subject: Re: Its a Free Language Hi -- On Sun, 1 Feb 2009, Mike Stephens wrote: > An attractive aspect of Ruby is how it is usually presented as agnostic > - you can use it in an object oriented style or you can choose > functional or procedural styles. So if you like to think in terms of > procedures instead of objects you can still sit at the same tables as > other Ruby programmers. Having said that, I would guess that any > procedure can be re-represented in terms of objects and your thinking > should move in that direction over time to align with the essence of the > language. I particularly like the way the functional/procedural programming style is engineered to work with the OO style, in the sense that functional-style method calls are actually calls to private methods -- and privacy is enforced by having to omit the explicit receiver... so that methods like puts, which are private methods of Object, can be called at any point in the program, since self is always an instance of a descendant of Object. In some respects, this is perhaps the most productive use of private methods in Ruby, since the privacy is not strictly enforced. If it did nothing else than provide a way to integrate the functional style into the OO architecture, it would still be worth it. David -- David A. Black / Ruby Power and Light, LLC Ruby/Rails consulting & training: http://www.rubypal.com Coming in 2009: The Well-Grounded Rubyist (http://manning.com/black2) http://www.wishsight.com => Independent, social wishlist management!