On 16.01.2014 16:26, Bozhidar Batsov wrote:They are plain method calls anyway. Like mentioned, `private', etc, are not keywords.
By "current implementation" I meant the current patch. Yeah, I think
that some way to have defs align to the start of an expression only for
modifier expressions might be a good idea in the interest of maximum
flexibility.
I don't think it's likely to change. Previously, the return value was undefined. Now that it's specified to be method name symbol, it probably won't ever change, in the interests of backward compatibility.
I meant to say that in
the current implementation of the feature in MRI assigning the result to
a variable doesn't make much sense, but in the future that might change
(if the return value becomes a method object instead of a symbol).
Ah, I see. It's probably considered an implementation detail, though.
In Rubinius defs have always returned an object:
def foo; end
=> #<Rubinius::CompiledMethod foo file=(irb)>
Thanks, but the occasional need for more flexibility is often apparent. The question I'm usually trying to answer is whether we can get away with fewer options, and still keep users happy.
Anyways, I think that the current patch will be good enough for most
users. I was just pointing out some potential problems in case they were
overlooked by you.