30,997
edits
Tag: 2017 source edit |
m (→PHP) Tag: 2017 source edit |
||
| Line 68: | Line 68: | ||
</syntaxhighlight> | </syntaxhighlight> | ||
====Closure or anonymous function==== | |||
If you new a function, just create a real one (or a method). | |||
Anonymous function are just forbidden (existing one should be removed), they brings a lot of problem: | |||
* Code readability | |||
* Broken static analytics tools that can't guess type or path of variable | |||
* Function documentation | |||
* AI become crazy | |||
* Coding debug trouble | |||
* Impact analysis more difficult as the stack trace of code can't be guess easily when function are not named explicitely. | |||
====Comments==== | ====Comments==== | ||