Hi,

2010/11/26 Shugo Maeda <shugo / ruby-lang.org>:
>>> I guess Module#refine works the same as using_refine in this case.
>>
>> Hmm.        >> adding an implicit block that includes the outer module?
>>
>>  
>>  
>> ..
>>  
>>
>> (equivalent to)
>>
>>  
>>    >> ..
>>  
>
> Could you tell me why you need this feature?

Because it requires less indentation, I thought.
But I found out that it has a problem of [ruby-core:33386] (1)...


>>> I don't think we need new keywords even if it is a big change,
>>> because some essential features such as module inclusion
>>> have no keyword in Ruby.
>>
>> Indeed.     >> code block (such as class/module definition, method definition
>> and control statements) have their special keywords.
>
> I guess that most of these constructs have reasons why they need
> keywords and special syntax.

I don't think so.  "class Foo; end" can be written as "Foo =
Class.new { }" (though there are indeed subtle differences between
them).


> If refine is a keyword, there is one good thing.   
> after class names.
>
>  
> ..
>  

The API design that "def" statements are put in a Ruby's block,
is slightly weird (for me).  I guess that there is no precedent of
such a style in Ruby's embedded featues, except meta programming
(such as Class.new and class_eval).
From now on, does Ruby encourage such a style in casual use?

-- 
Yusuke Endoh <mame / tsg.ne.jp>