From: Chris Pine Date: 2003-04-25T23:30:25+09:00 Subject: Re: How to call an object instance's method? ----- Original Message ----- From: "Brian Candler" The more I think about this, the more I think that either: - the 1.6.8 behaviour is better, or - make poetry mode compulsory: that is, disallow parentheses around argument lists altogether, to eliminate the ambiguity. ---------------------------- Or make poetry mode illegal. (Not a great option, but I had to throw it in for completeness.) ---------------------------- The latter would make the language less C-like, and would force you to write (sin a) + b instead of sin(a) + b What do people think of that?? ---------------------------- That is really cool! But I think ruby is too old for such a change. Anyway, what would this code do? sin a + b . abs It seems such things should be clear. Without adding parens *everywhere* (and becoming Lisp), I don't see how it would be easy to understand what the above does. (Of course, I wouldn't know what the above does in Ruby 1.6 or 1.8, either, without trying it in irb first; is it good that we have irb for such things, or is it bad that I need it for such things?) Are you saying that methods are greedy for arguments? Then I guess the above would be: sin(a + (b.abs)) Actually, that seems pretty reasonable... but this is still going to throw people off: sin(a+b) . abs which would really be: sin((a+b).abs) Perhaps people would get used to it if there wasn't already so much ruby code with the parens like they are now... but, like I said, I think Ruby is too old for such a change. Chris