std.v2020.algorithm etc[ WAS: Is run.d going to be expand for runtime and the phobos library?]

Andrei Alexandrescu SeeWebsiteForEmail at erdani.com
Mon Jun 22 16:37:08 UTC 2020


On 6/22/20 12:01 PM, H. S. Teoh wrote:
> On Mon, Jun 22, 2020 at 11:52:47AM -0400, Andrei Alexandrescu via Digitalmars-d wrote:
> [...]
>> At a point there was a discussion about allowing a similar conversion
>> to be done automatically by the compiler - opCall(). So whenever you
>> pass an object to a function, if the type defines opCall, it would be
>> automatically invoked.
> 
> This conflicts with the function call operator, which is also called
> .opCall.  I wouldn't want the function objects I pass around to be
> "accidentally" invoked just because it defines .opCall!

Oh, sorry. The name was different - possibly opOnCall.

All in all it's a matter of deciding on how important this problem is. 
(I think it is.)



More information about the Digitalmars-d mailing list