This one weird trick allows you to capture loop variables.

Timon Gehr timon.gehr at gmx.ch
Thu Oct 24 00:46:48 UTC 2024


On 10/24/24 01:00, Elias (0xEAB) wrote:
> On Sunday, 20 October 2024 at 22:45:24 UTC, Timon Gehr wrote:
>> As someone who has also implemented `opApply`, I do think it is quite 
>> straightforward. It's just internal iteration with support for 
>> multiple ways to exit the loop, encoded using numerical indices.
> 
> Do you have any suggestions or insights how we could resolve its rather 
> poor compatibility with the attribute soup?

Attribute polymorphism. It's a common feature in other effect systems, 
and it is generally useful.

Another solution is to avoid attributes. :)


More information about the Digitalmars-d mailing list