Hacker News new | past | comments | ask | show | jobs | submit login

> The only time I can think of where this is useful is when you are trying to be super defensive with possible exceptions being thrown.

If your application uses exceptions at all, then the time to be super-defensive about exceptions is all the time. If you don't form the habit, then you'll forget in the cases where it matters.

Plus, most programmers are pretty bad at identifying where exceptions might be thrown, because it tends to reduce to the question: "Where will my code have bugs?" Obviously, if you knew, you'd have fixed them...

> _much_ more readable code.

I'd argue that it's more readable to put state build-up and tear-down next to each other, so that future readers can see and modify them together. If you put them far apart, it's easier for them to skew.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: