3 ms·
This is what comments were made for! I'm sure it's legitimate, but you'd have to be insane to look at that code and not question why it exists.
by tomn 16y ago
This is what comments were made for!
I'm sure it's legitimate, but you'd have to be insane to look at that code and not question why it exists.
- code_duck 16y agoOne could also say you'd have to be sophomoric to assume the person who put if there didn't do so for a good reason.
- tomn 16y agoAs I said, I'm sure that it's legitimate, but it's definitely not good code, and I'd rather not have it lurking in my codebase for years on end. If you don't know the original motivation behind writing something like that, you can't really remove it for fear of the original bug cropping up again without you noticing. (I guess, then this is also what test cases are for...)
- vorg 16y agoA coding comment could say why 250 was chosen, and not 256, or Scala's 22 for max tuple sizes.
- eneveu 16y agoFor the late-comers (like me!), Javadoc comments were added since the parent comment was posted: $ svn log -r {2010-11-30}:HEAD http://svn.codehaus.org/groovy/trunk/groovy/groovy-core/src/main/org/codehaus/groovy/runtime/ArrayUtil.java ------------------------------------------------------------------------ r21150 | hamletdrc | 2010-11-30 19:32:11 +0100 (Tue, 30 Nov 2010) | 3 lines updated javadoc on arrayutil ------------------------------------------------------------------------ r21152 | hamletdrc | 2010-11-30 21:31:24 +0100 (Tue, 30 Nov 2010) | 1 line Updated ArrayUtil javadoc one more time so that people quite wondering what it is used for.