shouting versus dotting
Simen Kjaeraas
simen.kjaras at gmail.com
Wed Oct 8 13:15:24 PDT 2008
On Tue, 07 Oct 2008 16:27:00 +0200, Benji Smith <dlanguage at benjismith.net>
wrote:
> 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
void delegate() foo()
{
return delegate void() {);};
}
?
--
Simen
More information about the Digitalmars-d
mailing list