From: Robert Klemme Date: 2010-10-06T20:56:40+09:00 Subject: Re: The Third Ruby - Ever Comes Out at Night? On Wed, Oct 6, 2010 at 1:49 PM, Mike Stephens wrote: > Robert Klemme wrote: > >> Your statement sounds a bit like you wanted to use module nesting to >> also model caller callee relationships.  IMHO that would be a waste >> because the caller callee relationship is already modeled in code via >> actual calls. > > That's what I was floating. > > In this thread we're mulling over what procedural Ruby means and > therefore whether Ruby does it easily, and whether the end result is a > viable style. > > Procedural languages varied but typically your procedures would all be > at the top level so their relationships are only revealed by the code, > as you say. The objection to this is the absence of encapsulation and > therefore the prospect of people poking into your 'black boxes'. That > argument hinges around how much you can trust your fellow programmer. > > I recently had a technical lead who was very good at programming > including eg .NET. One day I asked him which language he liked the most. > He replied surprisingly that he had recently become impressed with PHP. > I got the impression he was implying it took all day to do things in C# > whereas it takes no time in PHP. From what I've seen of PHP it is > essentially procedural. Does he know Ruby? If so, why did PHP impress him more? That would be interesting to learn. > Perhaps when you have lots of simple short programs, a procedural design > is just fine. For small programs (probably one off) it is usually not so important what style you pick. I often find myself creating at least a few classes even for those. I find that convenient (especially in Ruby where the overhead is really small, often I can get away with a Struct one liner). YMMV though. Kind regards robert -- remember.guy do |as, often| as.you_can - without end http://blog.rubybestpractices.com/