shouting versus dotting
Andrei Alexandrescu
SeeWebsiteForEmail at erdani.org
Mon Oct 6 07:08:50 PDT 2008
Jarrett Billingsley wrote:
> On Mon, Oct 6, 2008 at 9:16 AM, Denis Koroskin <2korden at gmail.com> wrote:
>> On Mon, 06 Oct 2008 16:42:51 +0400, Jarrett Billingsley
>> <jarrett.billingsley at gmail.com> 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;
>> And what causes ambiguity here? I mean, imagine you can't drop empty
>> paranthesises.
>>
>
> The point is that something like "foo()(5)" could then be either a
> template instantiation or a chained call.
I think there is ambiguity, and another problem is that we wanted to
make things "better"; under these circumstances, terser would be better.
Andrei
More information about the Digitalmars-d
mailing list