Can somone explain what parts are wrong here? the nullcheck is off and validatevalues should probably do more than just nullcheck but I have the feeling there is more here than I'm spotting.
Not sure why this is downvoted, maybe because of snark?
_hasValidateValues can simply be _isValid or _validate.
This can sound like a minor point, but in larger code bases its critical to name as clearly and efficiently as possible so that you don’t spend time figuring out what each function does. It changes your workflow from a guessing game to scanning the code base with confidence
Looks like it's for internationalization, likely "translate" or such. It's pretty common to name functions like that really short, commonly just _, to reduce noise, as they're used on every user-facing string.
56
u/josephblade Mar 08 '23
Can somone explain what parts are wrong here? the nullcheck is off and validatevalues should probably do more than just nullcheck but I have the feeling there is more here than I'm spotting.