3 ms·
Comments exist for humans to understand the why of the code, including perhaps external dependencies/assumptions/requirements. LLMs inserting code comments mak
by pc86 1mo ago
Comments exist for humans to understand the why of the code, including perhaps external dependencies/assumptions/requirements.
LLMs inserting code comments makes zero sense by definition.
- pavlov 1mo agoThat’s not true because LLMs clearly benefit from having multiple statements representing aspects of the same thing. That’s why they’re always doing the “it’s not X, it’s Y” kind of patterns. It’s reinforcement.
- selcuka 1mo ago> LLMs inserting code comments makes zero sense by definition. Not completely, because anyone who reviews the code in the future does not have access to your original prompt, so theoretically leaving a comment that explains the "why" portion of the prompt would be useful. LLMs rarely do that, though.
- hombre_fatal 1mo agoLLMs benefit from knowing the why, the intent, and the reason/justification for code to exist, too. Catching code desyncing from it is a valuable place to reconsider assumptions and maybe even invariants.