https://issues.dlang.org/show_bug.cgi?id=16001

Dlang Bot <[email protected]> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Keywords|                            |pull

--- Comment #2 from Dlang Bot <[email protected]> ---
@adamdruppe updated dlang/dmd pull request #12528 "deprecate the common mistake
people make coming from Javascript and C#" fixing this issue:

- fix issue 16001

  A common mistake D users make - sometimes even experienced D users - is
  to use `() => { multi; line; lambda; }`. This syntax is common in
  several other languages, including D's syntax relatives of Javascript
  and C#, but in D, it is completely different (yet frequently still
  compiles!)  and leaves users puzzled why their code seemingly does
  nothing.

  This deprecation is aimed very specifically at that syntax rather than
  the semantic construct to warn them that they're doing it wrong and it
  offers easy suggestions to clarify their intent with existing D syntax,
  similarly to how `if(a = x)` and switch fallthrough was deemed more
  error-prone than it was worth given the easy and clear alternatives.

https://github.com/dlang/dmd/pull/12528

--

Reply via email to