From: gabriele renzi Date: 2005-05-19T06:05:13+09:00 Subject: Re: syntax sugar: treating an object like a method Austin Ziegler ha scritto: >>Oh, never say never. I still fantasize about first-order >>functions/ methods (although that need would probably be better >>served by other means). For this particular purpose I would tend >>to agree, though. > > > As I understand it, Ruby already has first-order functions; they're > just not (currently) callable with foo(). Ruby 1.9 has an > experimental change that does this for local variables that have > Methods or Procs in them. AFAIK it does work (reasonably to me) for everything that has #call. > At the very least, no one has been able to explain to me why what > Ruby does isn't acceptable. I don't want or need Ruby to be Python > and I don't want or need a () operator. > it *is* acceptable, *I* would just prefer some syntax sugar. I mean, x.foo() is quite acceptable but I think x.foo is nicer.