3 ms·
The right answer to this is that IDEs should wrap lines automatically according to the actual dimensions of the editor, but they need to understand the syntax o
by int_19h 11mo ago
The right answer to this is that IDEs should wrap lines automatically according to the actual dimensions of the editor, but they need to understand the syntax of the language they are wrapping to do that right.
- strogonoff 11mo agoYes, but no one has bothered to implement that so far and chances are no one’s going to.
- 1718627440 11mo agoExcept that were I do line breaks and how much I align the next token is a hint, how I think about the code. No IDE is able to automatically infer information, that isn't present in the input data.
- strogonoff 11mo agoThat is a good point. Linebreaks are an extra channel of meaning, sort of like body language and intonation going hand in hand with speech. Sometimes I would visually separate a short bit of code from its surroundings (and usually add a comment on top) to make it clear that it is a controversial bit that needs attention of the reader. The same mechanism applies in less extreme cases, lifting baseline legibility.
- 1718627440 11mo agoComparing it to body language is a good insight, I haven't thought of.