| Thread overview |
|---|
May 07, 2016 [Issue 16001] Lambda syntax: forbid use with FunctionLiteralBody: (x) => {assert(x);} | ||||
|---|---|---|---|---|
| ||||
https://issues.dlang.org/show_bug.cgi?id=16001 greenify <greeenify@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |greeenify@gmail.com -- | ||||
May 13, 2016 [Issue 16001] Lambda syntax: forbid use with FunctionLiteralBody: (x) => {assert(x);} | ||||
|---|---|---|---|---|
| ||||
https://issues.dlang.org/show_bug.cgi?id=16001 Xinok <xinok@live.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |xinok@live.com --- Comment #1 from Xinok <xinok@live.com> --- Further discussion here: http://forum.dlang.org/thread/hjjbizewgoqkybycmwkw@forum.dlang.org -- | ||||
May 18, 2021 [Issue 16001] Lambda syntax: forbid use with FunctionLiteralBody: (x) => {assert(x);} | ||||
|---|---|---|---|---|
| ||||
https://issues.dlang.org/show_bug.cgi?id=16001 Dlang Bot <dlang-bot@dlang.rocks> changed: What |Removed |Added ---------------------------------------------------------------------------- Keywords| |pull --- Comment #2 from Dlang Bot <dlang-bot@dlang.rocks> --- @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 -- | ||||
May 26, 2021 [Issue 16001] Lambda syntax: forbid use with FunctionLiteralBody: (x) => {assert(x);} | ||||
|---|---|---|---|---|
| ||||
https://issues.dlang.org/show_bug.cgi?id=16001 Dlang Bot <dlang-bot@dlang.rocks> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |RESOLVED Resolution|--- |FIXED --- Comment #3 from Dlang Bot <dlang-bot@dlang.rocks> --- dlang/dmd pull request #12528 "Fix 16001 - forbid lambda syntax followed by FunctionLiteralBody" was merged into master: - 7e9c5705e15fc980bd92f3752377ba75f2e73d12 by Adam D. Ruppe: fix issue 16001 - forbid lambda syntax followed by FunctionLiteralBody 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 -- | ||||
July 09, 2021 [Issue 16001] Lambda syntax: forbid use with FunctionLiteralBody: (x) => {assert(x);} | ||||
|---|---|---|---|---|
| ||||
https://issues.dlang.org/show_bug.cgi?id=16001 Dennis <dkorpel@live.nl> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |qs.il.paperinik@gmail.com --- Comment #4 from Dennis <dkorpel@live.nl> --- *** Issue 17951 has been marked as a duplicate of this issue. *** -- | ||||
Copyright © 1999-2021 by the D Language Foundation
Permalink
Reply