5 ms·
That actually didn't occur to me. I'm not sure where I'd put the comment, since in the part where router paths are set up, it's self-documenting/obvious that i
by literallycancer 9y ago
That actually didn't occur to me.
I'm not sure where I'd put the comment, since in the part where router paths are set up, it's self-documenting/obvious that it isn't an issue, and if the person skips that and looks at individual functions only, then I'd have to put it in too many places.
- lozenge 9y agoI guess I'd put it in the paths, as it's something that needs to be kept in mind while updating the paths. Also in the coding conventions, but it's understandable not to have one on a small project. Another option is to create a function like _escape_numeric_string that returns its input after asserting the string is numeric and has a comment explaining, and use it everywhere. Although yes, that does mean changing all your individual functions. Generally if a code reviewer suggests a change it is worth documenting why the change isn't practical. That can be adding a test or adding a comment.