[grammarians] Fwd: Re: Method call syntax

MenTaLguY mental at rydia.net
Tue May 9 14:28:19 EDT 2006


I think I mentioned this change in future Ruby versions during our earlier method call discussions, but if not:

-------- Original Message --------
Subject: Re: Method call syntax
Date: Tue, 9 May 2006 14:10:28 +0900
From: Yukihiro Matsumoto <matz at ruby-lang.org>
To: ruby-core at ruby-lang.org

Hi,

In message "Re: Method call syntax"
    on Tue, 9 May 2006 05:48:13 +0900, mathew <meta at pobox.com> writes:

|"Omission of parentheses around method arguments may lead to unexpected
|results. Note that the Ruby developers have stated that omission of
|parentheses may be disallowed in future Ruby versions..."
|
|Is this true? I've been unable to find any reference to the alleged
|unexpected results.

It's in fact:

 Omission of parentheses around method arguments for method calls in
 the argument list may make programs hard to read / parse.

for example,

  p sprintf "the answer=%d\n",42

warns like "warning: parenthesize argument(s) for future version", and
recommended code should be

  p sprintf("the answer=%d\n",42)

							matz.



More information about the Rubygrammar-grammarians mailing list