12 ms·
If a case like this pops up, how about asking them why they did it like that and then making your judgement based on response instead of questioning their compe
by thdc 6y ago
If a case like this pops up, how about asking them why they did it like that and then making your judgement based on response instead of questioning their competence right away?
Response 1: I thought it would be clearer with the explicit comparison. (fine, then you can bring in your own opinion and maybe have a nice discussion)
Response 2: You don't need == true? I never knew. (bad)
Another common scenario that is complained about: using `this` with instance variables when it's technically unnecessary.
- coin 6y agoThe point is that "if" branches based on a boolean value. A comparison is just one way to produce a boolean value. There's nothing explicit by adding "==true". It just show a lack of understanding of "if".
- gnusty_gnurc 6y agoPrecisely. Thank you.
- xorcist 6y agoIf an extra "== true" can be considered more precise, would if ((conditional == true) == true) be even more precise?