Hacker News new | ask | show | jobs
by falcolas 3249 days ago
Given the ease with which editors resize tabs, and given the problems caused by excessively nested code: seems reasonable.
1 comments

I agree. I use spaces and 2 to 4 depending on typical language style but even then heavy nesting is obvious.

I have a project full of essentially 'if (true) return true; else return false;'. Sometimes heavily nested. It's just not necessary.

Guard-style returns go a long way but a long column of those may mask deeper problems of structure. I don't mean inheritance-polymorphism no-ifs but rather your code isn't dumb enough and perhaps your data isn't smart enough.