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

H. S. Teoh hsteoh at quickfur.ath.cx
Mon Jun 22 16:01:04 UTC 2020


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!


T

-- 
In a world without fences, who needs Windows and Gates? -- Christian Surchi


More information about the Digitalmars-d mailing list