I propose for the parser to interpret "object(...)" as "object.call(...)". It should raise NoMethodError at runtime if object doesn't respond to "call".
This would read better than using "call":
double = -> n { n * 2 }
double(3) == 6
Sorry if this has already been proposed before (and rejected) but I couldn't find any references to something like this using Redmine's search interface.
Author: rosenfeld (Rodrigo Rosenfeld Rosas)
Status: Rejected
Priority: Normal
Assignee: matz (Yukihiro Matsumoto)
Category: core
Target version: Next Major
I propose for the parser to interpret "object(...)" as "object.call(...)".
It should raise NoMethodError at runtime if object doesn't respond to
"call".
This would read better than using "call":
double = -> n { n * 2 }
double(3) == 6
Sorry if this has already been proposed before (and rejected) but I
couldn't find any references to something like this using Redmine's search
interface.
Yes, I know, it is just that I prefer to read object.call(arguments) than object[arguments]. This is just a personal opinion, I know and I can change my mind some day about this :)