From: matz@... (Yukihiro Matsumoto) Date: 2001-05-21T08:54:29+09:00 Subject: [ruby-talk:15444] Re: A proto-RCR: making def and class rvalues Hi, In message "[ruby-talk:15434] A proto-RCR: making def and class rvalues" on 01/05/21, Dave Thomas writes: |I'm wondering about the following set of changes: | |1. Allow class and method definitions to appear as rvalues | |2. Have class definitions always return the newly defined class. | |3. Have method definitions return an UnboundMethod object | corresponding to the method just defined. | |4. Add methods to UnboundMethod to return the name and name as symbol | of the method. | |5. Alter the functions and statements that currently accept a method | name or symbol to also accept an UnboundMethod object. I think changes 1, 2 and 4 are OK. But I don't really agree with changes 3 and 5, because: * it requires object creation unnecessary for most of the cases. * UnboundMethod has information of name AND class it belongs, so that changes to functions and statements are bigger than simply retrieve symbol from it. Shugo Maeda once proposed making "def" to return symbol name of the defined method. matz.