From: Avdi Grimm Date: 2001-08-13T21:46:02+09:00 Subject: [ruby-talk:19633] Re: () overloading On 13 Aug 2001 19:25:09 +0900, Ed Sinjiashvili wrote: > aProc = Proc.new {|a, *b| b.collect {|i| i*a }} > aProc(9, 1, 2, 3) # [9, 18, 27] I'll second that! Coming from a C++ background, there's something that makes me feel all warm and fuzzy to know that my closures and function objects can have the exact same syntax as "real" functions. It makes it easier to replace a function with a functor during refactoring, for one thing. Also it means that down deep within a subroutine I don't have to think about unimportant details like "this 'foo' is a method, and needs to be called /this/ way; but 'bar' here is an object, and needs to be called /that/ way" - I know that they are both callable, and so can just use the same syntax on both. I think people from a Python background would like this as well, since Python has the option to overload () too. my $0.02, ~Avdi