3 ms·
> I had to spend time justifying the presence of that ‘0’ many times over the years as other developers questioned its purpose. One of the better cases for usi
by mannykannot 7y ago
> I had to spend time justifying the presence of that ‘0’ many times over the years as other developers questioned its purpose.
One of the better cases for using appropriate comments...
- 1-more 7y agoSlightly zestier idea: make a helper function `makeMostlyEmptyHashSet` and a linter rule that warns on `new HashSet`. You can turn off the linter warning with a comment in every linter I've used, and that comment could include a justification for the default sized `HashSet`.
- egdod 7y agoHaving to justify using a default is a little too zesty for my taste.