4 ms·
It seems perfectly well named to me! I love when code bases have more lines of comments than actual code.
by bigmanwalter 7y ago
It seems perfectly well named to me! I love when code bases have more lines of comments than actual code.
- ricardobeat 7y agoSometimes the comments are only required because the code is confusing. In this case the function both mutates the state, and renders the app. If using a framework like React/Vue etc it might make perfect sense to call this function `move`, but here it has a lot more responsibility and would need a more representative name like update/setState/renderApp/etc. But I think it's pointless to debate as it breaks the single-responsibility principle and you're unlikely to find something like this in a large scale app anyway.
- bigmanwalter 7y agoIt could also be because the code is terse. In that case it makes sense to explain what's going on.