Hacker News new | ask | show | jobs
by khitchdee 1361 days ago
Why could you not create a comment block above the code section in question and fold it. All IDE's nowadays support folding, including comment block folding. To see what a section of code does, you unfold the comment block above it, read it, then fold it back.
1 comments

But if it can be generated on the fly, why persist it to the code at all?
I guess if the AI is good enough, your point makes some sense. It's a good programming habit to doc your code as you write it. If you do this in a structured way and code folding is used the comments should get out of the way from the main code.
To save computational resources could be an answer.