4 ms·
I agree. If you know you're writing something that is un-idiomatic or you think its intended purpose will be a surprise to most readers, put a comment in explai
by scott_s 15y ago
I agree. If you know you're writing something that is un-idiomatic or you think its intended purpose will be a surprise to most readers, put a comment in explaining why.
// we need a heap object so we can synchronize on it later
Boolean b = new Boolean(true);
- cdmckay 15y agoI'd also make the name a bit more descriptive.
- groby_b 15y agoThis points to a deeper problem of static analysis, though - any analysis package without the ability to annotate code is _doomed_. The false positives will be so annoying that people will give up on it. And for the people who work on SA systems - please give me a way to annotate that is not exclusively via comments. Especially once people use multiple SA packages, that is rather annoying :)