Hacker News new | ask | show | jobs
by city41 1739 days ago
The downside to this approach is it often doesn't survive refactors. People change the method signature, update call sites, and often ignore the comments. Named parameters avoid this downside, it's a real shame named parameters are not more common in languages.
1 comments

Linters can check for this sort of thing, for example Error Prone[0] has a lint[1] for this.

Totally agree this is better to be in the language proper so we don't need this extra tooling.

[0]: https://errorprone.info

[1]: https://errorprone.info/bugpattern/ParameterName