Functional programming in D and some reflexion on the () optionality.

deadalnix deadalnix at gmail.com
Mon Aug 6 12:55:06 PDT 2012


Le 06/08/2012 21:42, Christophe Travert a écrit :
> Timon Gehr , dans le message (digitalmars.D:174329), a écrit :
>> On 08/06/2012 07:20 PM, Christophe Travert wrote:
>>>
>>> What do you think?
>>
>> Creating byzantine language rules to cater to unimportant or
>> non-existent use cases will slaughter the language.
>
> What exactly do you consider byzantine here, whatever that means?
> Implicit cast is an already defined feature. Clarifying the way
> parenthesis-less function calls exist by adding a casting rule is making
> the langage more simple IMHO, and might improve the current position. Of
> course, if your point is that parenthesis-less function calls are
> unimportant or non-existent, then I understand your point of view, but
> other people seems to think differently.
>

auto opDispatch(string name, T, U...)(T delegate() dg, U u) {
     mixin("return dg()." ~ name ~ "(u);");
}

I was thinking about something along that line instead of adding again 
more language feature.

But that really isn't that important. Being able to call or not without 
() isn't a that big deal. The mess created is.


More information about the Digitalmars-d mailing list