Struggling to implement parallel foreach...

Timon Gehr timon.gehr at gmx.ch
Tue Jun 18 11:42:35 UTC 2019


On 18.06.19 11:10, Walter Bright wrote:
> On 6/13/2019 6:55 PM, Timon Gehr wrote:
>> It's not pretty that the qualifiers have a different meaning for 
>> member functions and nested functions (because the nested function 
>> meaning could be useful for member functions too), but it's what we have.
> 
> Keep in mind that the address of a nested function and the address of a 
> member function have the same ABI. In fact, closures are implemented as 
> member functions under the hood.

I know. This is how it should be, and it is not a problem. Basically, I 
was complaining about the aesthetics of the fact that there is no 
trivial way to write a member function for only e.g. the immutable part 
of a struct instance. As I said, I don't think this part needs fixing.


More information about the Digitalmars-d mailing list