From: "David A. Black" Date: 2005-03-21T07:22:31+09:00 Subject: Re: Paul Graham recommends Ruby Hi -- On Mon, 21 Mar 2005, Martin DeMello wrote: > David A. Black wrote: >> >> Actually there's a kind of double reasoning process involved here. >> x[] is a method designed *not* to look like a method -- but it *is* a >> method, can be redefined, etc. Therefore, () attached to a variable, >> while also not looking like a method, looks like it should be one of >> those things that don't look like methods but actually are. So it's >> really within the framework of this kind of Ruby idiom that what I'm >> saying applies. > > If () ever gets to the stage where it works on literals as well as > variables, It doesn't work on either right now, though, just on method identifiers. > having the syntax be () and the method be #call will be > precisely analogous to the syntax for...in calling the method #each. So > at least there's some sort of precedent, and () looks far more rubyish > than for...in does. I admit that for...in analogies don't do a whole lot for me -- it's not my favorite :-) But I don't think the case is exactly the same. It's not so much the call/() thing as the method/lambda thing that I find incongruous -- that is, putting () after a variable that refers to a lambda and have the variable sort of morph into the equivalent of a method name. Or something like that. David -- David A. Black dblack@wobblini.net