From: Simen Edvardsen Date: 2007-01-02T03:12:40+09:00 Subject: Re: Little Things On 12/30/06, Trans wrote: > I was a bit surprised about Matz mention of the little things in his > last href="http://www.rubyist.net/~matz/slides/rc2006/mgp00017.html">ketynote. > Little things can make all the difference! In fact, long time Rubyists > have been waiting a long for some important "little" things. Here's > some of the things on my little list.... > [...] When we're talking about little things, I've got one suggestion as well. Python has the nice trick that you can call any object like a function by simply overriding the __call__ method. Something like that would be nice to have in Ruby as well. When you call an object with the normal syntax, the fallback could be the #call method or some such. Then it'd be possible to do this: def some_method(&proc) proc("Hello") proc "Hello" proc 1, 2, 3 end I admit that having a separate function namespace means that we can have ice syntax for method calls with no parens, but something like this would permit some cool tricks. -- - Simen