On Saturday, 2 January 2021 at 12:29:43 UTC, Marcone wrote:
Why "lazy delegate()" need two parentheses to execute function?

AFAIK is 'lazy' some kind of delegate storage class which accept an expression to execute. The reason you can actually use the parameter without "()" is just CTFE sugar which calls it automatically on use.

On the other hand, if you supply a 'lazy delegate()' the compiler does not know to call only the lazy expression or the delegate itself.


Reply via email to