On 02.10.2010 12:56, Mike Stephens wrote:
>
>> I guess. This top-level approach would only take you so far .
>
> Prior to the advent of OO, we used procedural styles, and we still had
> to run 500-seat call centres, book planes, run multinational banks,
> invent new drugs etc.

Well, prior to automobiles people had to get from A to B, too.  Ah, the 
good old times.  But then it took a week to travel 500km which we easily 
do in one day today.  Plus, we have heating in winter.

> I guess applications that are database-oriented are easier to do
> procedurally as you tend to use simple data structures (relations ->
> arrays).

There is no reason why these "simple data structures" should not contain 
functionality beyond setters and getters.  I'm not even sure that your 
statement about simpler data structures in DB oriented applications is 
correct.  Data models of even the simplest of ERP systems are quite 
complex - and that doesn't even include SAP and Peopleware.

> Trying to use procedural for some GUI visual design package would be
> tough, but a lot of real applications (web sites, twitter etc) are just
> reading and writing simple data structures.
>
> The plus about procedural is it makes you partition. Just creating
> objects doesn't necessarily add order and elegance to a system.

What you call "partitioning" is the core of software engineering: 
separating concerns and distributing functionality across language 
constructs is the most important thing we do - and we do it all the 
time.  OO gives you another dimension in which you can distribute 
functionality.  IMHO this is what makes it superior to procedural 
programming - but also more difficult.  I do not believe that procedural 
programs are automatically better or worse than object oriented ones.

Btw, it is not easy to use Ruby procedural only.  First, because 
everything is an object, which means you cannot escape object 
orientation.  Second, even if you try to only write top level methods 
and not use instance methods (which will at least make it look 
procedural) you will have a hard time doing only the simplest of string 
manipulations because the majority of that functionality sits in 
instance methods of String (#gsub, #scan, #[] etc.).

Kind regards

	robert

-- 
remember.guy do |as, often| as.you_can - without end
http://blog.rubybestpractices.com/