From: Robert Dober Date: 2008-01-16T04:02:50+09:00 Subject: Re: Callable class with block On Jan 15, 2008 11:15 AM, Lars wrote: > On Jan 14, 5:22 pm, Robert Dober wrote: > > I am not sure I follow you > > I'm just trying to say that I don't think that what you suggest is > intuitive behaviour to everyone. I personally think that it doesn't > make sense from a syntax point-of-view. Operators and function calls > are syntactically different things. Function calls take optional block > arguments, operator don't. I doubt its even possible to construct an > unambigious syntax. Sorry but that just does not make sense to me... > > > when I realized that I could not go > > anything + 42 { 42 } > > I was quite disappointed ... > > Consider > > def something; 42; end > > anything + something { 42 } > > Would the block be passed to 'something' or the '+'? Well this is for the parser to decide, right? But a + s &b being a.send(:+,s,&b) would make more sense as we still could easily override this via the following a + s(&b) a + s(){} a + (s {}) Robert > > > -- http://ruby-smalltalk.blogspot.com/ --- Whereof one cannot speak, thereof one must be silent. Ludwig Wittgenstein