On Sunday, 30 May 2021 at 09:39:28 UTC, cc wrote:
>Is there any way to enforce at compile time that we're not accidentally allocating when creating a delegate, other than being carefully aware of what variables are referenced inside the body?
Use function
instead of delegate
. Then it doesn't have a context pointer at all.