optional (), what is done elsewhere

"Jérôme M. Berger" jeberger at free.fr
Tue Feb 5 10:27:52 PST 2013


Ary Borenszweig wrote:
> On 2/4/13 2:10 PM, "Jérôme M. Berger" wrote:
>> deadalnix wrote:
>>> 1/ Ruby.
>>>
>>> In Ruby, method are called without (). This is not ambiguous as
>>> fields are always private.
>>>
>> 	Note that in Ruby, this line:
>>
>> foo(1, 2)
>>
>> 	Means something different than:
>>
>> foo (1, 2)
>>
>> 	That may not be ambiguous for the computer, but it sure is for the
>> programmer....
>>
> irb(main):001:0> foo (1, 2)
> SyntaxError: (irb):1: syntax error, unexpected ',', expecting ')'
> foo (1, 2)
>         ^
> 
> Not ambiguous at all, it's a syntax error because (a, b) is not a valid 
> expression.
> 
	Like I said, it is not ambiguous for the computer, but it is for
the developper.

		Jerome
-- 
mailto:jeberger at free.fr
http://jeberger.free.fr
Jabber: jeberger at jabber.fr

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 198 bytes
Desc: OpenPGP digital signature
URL: <http://lists.puremagic.com/pipermail/digitalmars-d/attachments/20130205/e394b580/attachment.pgp>


More information about the Digitalmars-d mailing list