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

Huh. Considering they also implement an 80 character limit to line length, that could be a bit restrictive. Perhaps it means you have to refactor into a function once you reach a certain depth of blocks. You can only really go 9 blocks deep.

I hate line length limits personally. Especially because I tend to use long identifiers which eat up most of my line length limit in one go if you try to utter them with their enclosing namespaces.




It's intended to be restrictive. The idea is that more than three levels of indentation should be the exception rather than the rule. Exceeding that without good reason is a hint that functions should be split up.

Having some such rough limit is a good thing, but the number 3 is language dependent. Java for example automatically eats one level for the class.

Also C lacks syntax such as nested functions, try blocks, python-style context managers and all kinds of other stuff which excuse more levels of indentation.




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

Search: