3 ms·
Using an underscore for a variable name is perfectly fine when defining callback functions, where the underscore merely fills the void for the 1st parameter nam
by JMTQp8lwXL 6y ago
Using an underscore for a variable name is perfectly fine when defining callback functions, where the underscore merely fills the void for the 1st parameter name, and you only need the 2nd parameter.
- rfw300 6y agoSo naturally, one should be sure to use underscore variables in all contexts except that one.
- samatman 6y agoThe convention in our codebase is quite simple: only use `_` as a name if you will ignore that parameter or value, and always use `_` when you will ignore that parameter or value.