From: "T. Onoma" Date: 2003-11-28T09:57:00+09:00 Subject: Re: Controlled block variables On Wednesday 26 November 2003 10:24 pm, Dan Doel wrote: > So do you allow callable objects in the latter mode? This is all > essentially making > functions/methods first class in Ruby. However, if you do this, then while > > foo.meth arg1, arg2, ... > > is clear, > > foo.meth > > isn't. It could either be the first class method 'meth' of the object > 'foo', or the result > of calling the method 'meth' of 'foo'. In other words, you need to > switch to explicit > method call semantics like Python: > > foo.meth is a method object, > foo.meth() is the result of calling the method > > So if you allow callable objects, and run it to its logical conclusion, > you end up > needing parentheses (which I don't think everyone's wild about). > > I'm sure there's stuff I'm leaving out. Search the ruby-talk archives > for the whole > big discussion if you're interested. I see. And I'll check the archives to learn more (although that search function is not so great). But I wonder, couldn't the only exception be made for Proc? So without the perens a Proc is a Proc, with perens it's evaluated. foo.aproc is a Proc object, foo.aproc() is the result of calling the Proc This kind of distinction is already made with locals vs. methods. Just b/c Procs face the problem doesn't mean it has to be extend to all. Or am I missing something further? -t0