3 ms·
> I'll never understand why people want code folding. Sometimes cognitive load is correlated with visual load. Perhaps most people don't suffer from this prob
by memling 5y ago
> I'll never understand why people want code folding.
Sometimes cognitive load is correlated with visual load. Perhaps most people don't suffer from this problem? But I do.
Other times code works as an outline, and folding branches (for example) is useful to visualize the logical outline without immersing in implementation details.
Occasionally I need a refresher on a bit of code, not something super in depth, and folding is good for giving me a mental prompt.
Folding allows me to keep context in an API (if it's logically laid out in the file) for reference without having additional clutter in my editor. (This is a personal thing that's also probably not terribly applicable for many people who might prefer a collapsible tree in their IDE.)
If I'm stuck in configuration file hell, especially XML ones (here's looking at you finicky Eclipse stuff I've had to deal with in the recent past), having folding is super helpful for skipping past completely irrelevant content.
I mean, I could go on, but I've found it useful.