On May 15, 2007, at 4:55 AM, Mike Hamilton wrote:

>
> 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?
>
> I have to wonder what exactly the benefit of having control structures
> as objects would be? The bottom line effectiveness of any language
> relates to what one can accomplish with it and how efficiently said  
> task
> can be accomplished. Under what circumstance would overriding the "if"
> method be beneficial? Not to mention the fact that since Ruby provides
> the ability to override things like operators and more functional
> components (that can be more logically represented as objects),  
> then why
> would the lack of control structure object orientation make Ruby  
> less of
> an OO language? Not to mention the kind of trouble that one could  
> easily
> get into attempting to override control structures.
>
> -- 
> Posted via http://www.ruby-forum.com/.
>
Hmm... there could be some bizarre and interesting possibilities.
For example, instead of if,
why not a construct called 'perhaps' or 'maybe' to include randomness  
or other interesting side-effects.
Or even 'occasionally' or 'usually' for weighted randomness.
Adverbs could make very interesting control structures, which could  
of course be def'd more (or less) precisely.
Imagine the expressive possibilities of:  often, quickly, slowly,  
monthly, quarterly, hourly, randomly, quietly, obsequiously,  
obscenely, derisively, politely, privately, publicly, etc...
'unless' could be 'other_than' or 'except_if'
'if' itself could be semantically described as the same as 'when' in  
many human languages.
Rather than simply being declarative like java keywords, many  
constructs could become more descriptive.
This is one of Ruby's biggest strengths, its expressiveness in a very  
natural way.

Once it has got the native unicode thing happening, it will be  
possible to begin to write Ruby in languages other than English!
Even in Japanese (which would by its grammar, make a very good  
programming language)

Some abstraction is bad because it continues to slow things down, but  
processing power is still increasing, while human limits are pretty  
constant.