Re:Ask HN: Do you ever go back and admire a piece of code yo...
by t-writescode on Friday May 08, 2020 @10:07PM
(#23121571)
Are they ‘what?’ or ‘wat?’ comments? Maybe that’s the difference?
Re:Ask HN: Do you ever go back and admire a piece of code yo...
by whynaut on Friday May 08, 2020 @10:29PM
(#23121693)
what, opposed to ‘why’ or ‘how’
Re:Ask HN: Do you ever go back and admire a piece of code yo...
by t-writescode on Saturday May 09, 2020 @03:21AM
(#23122909)
No, I understand that part; but, I think of a "what" comment as "incrementing value of X"
a "wat" comment, like the meme, is more of a "this is a really weird blob of code that might be obvious when you break the whole thing apart; but, what it's doing is _this_ this is the implementation of it because we have a complicated data structure that's connecting all these pieces"
This does sometimes entail a few 'what'-style comments, so I'm disappointed to regularly read of programmers that have apparently taken up arms against them.