On Monday, 20 November 2023 at 08:47:34 UTC, Antonio wrote:
I understand the problem with UFCS (``next`` is not using UFCS because it is a delegate defined in the own main() function, and ``Counter``` without () is treated as a function call because it is UFCS eligible )

This is not UFCS, it's [optional parentheses][1], which is a separate language feature. (Reminder: UFCS only applies when the callee has the form `x.y`)

According to the spec, it's disabled for function pointers and delegates due to the potential for ambiguity.

[1]: https://dlang.org/spec/function.html#optional-parenthesis

Reply via email to