shouting versus dotting

Benji Smith dlanguage at benjismith.net
Tue Oct 7 07:27:00 PDT 2008


Jarrett Billingsley wrote:
> On Mon, Oct 6, 2008 at 6:59 AM, Denis Koroskin <2korden at gmail.com> wrote:
> 
>> If we don't omit parenthesises, the ambiguity goes away:
>>
>> foo()(5)
>> foo(5)()
>>
> 
> No it doesn't.
> 
> Stdout("foo")("bar!").newline;

This is one of the main reasons I dislike opCall.

Combined with optional-parentheses for function invocation, opCall is a 
poison-pill that creates a lot of potential ambiguities and prevents the 
implementation of more compelling features.

--benji



More information about the Digitalmars-d mailing list