Comment

Comment by Deukhoofd

I don't disagree that functions with many execution paths are harder to read, but I do believe that the solution given here; 'just split it into multiple functions' frequently makes a function even harder to read. It forces you to scroll back and forth between code.

I think generally when you run into something like this, the better way to handle it is to sit back, and reconsider how your overall handling is designed.

parent Deukhoofd 1 month ago

Discussion

Live from the official Hacker News API

A modern reader for Hacker News · SvelteKit + Skeleton