Hi Lucas,

On 10 May 2007, at 21:26, Lucas Holland wrote:

> Hi,
>
> I've got someone here saying that Ruby (and other languages) can't be
> 100% object-oriented because if and unless and so on (keywords) are no
> objects.
>
> How can I defend the claim that Ruby is 100% OOP?

Do you have to?

There are a lot of languages claiming to be pure OO languages, but  
are they really? What is a pure OO language at all?

Some say Java is OO, but is it? I don't think so. Java is OO in a  
sense but lacks a lot of features that would make is "purely" OO.

A pure OO implementation of a language would have to have the  
capacity to model anything in life. That is we would not have only  
objects (or classes) but would also need some kind of verb construct  
that we would be able to model. Or how do you model a class for let's  
say a while statement? This would be a verb that you could model  
somehow...

verb While
   def condition_met?
     #bla bla bla
   end
end

The real question here is if it makes sense at all. I think that the  
work done so far in OO is much more impressive than this. Instead of  
trying to focus on the pureness of a language regarding it's OO-ness  
we should focus on how good can I model the Domain Model (i.e. the  
problem) at hand and how good does it help me to solve that problem.

Coming from a Java environment I can remember the times when we used  
JDBC (back in the late 90's) coding our access to the database,  
transactions, two-phase-commits. Then Hibernate appeared down the  
road and made life easier. And in Ruby...

Well, if you have ever coded a database access in Java (or C, or any  
compiled language y guess) and then see the power of ActiveRecord  
(and of Ruby in this case), how it dynamically gives you methods to a  
class that did not have them before... That is impressive!

It not only helps you to work faster and having more fun (something i  
really appreciate, I remember a few months ago, when I started  
working with Ruby I changed a middleware server my company did in  
Java for the last one and a half years in one day using Ruby), it  
gives you those tools (idiomatic) to model much better the domain at  
hand.

And that is something to consider. Does this language help me to get  
the job done? Or if you are talking to your boss... Than make a  
simple calculus:

1,5 years coding in Java = hundreds of thousands of euros
1 day coding in Ruby = lots of fun

Cheers,

Enrique Comba Riepenhausen