2 ms·
> Depth first, you make the happy path work, then refine error handling. Breadth first, you ensure everything is handled at every moment. That's correct. I've
by sagichmal 8y ago
> Depth first, you make the happy path work, then refine error handling. Breadth first, you ensure everything is handled at every moment.
That's correct. I've heard people describe Go as wanting you to code the sad path first, and then backfill the happy stuff (the business logic) once the error handling is complete. This tracks to my experience. That is, when I program that way, I feel like I'm in sync with the language.