Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

>spaces vs. braces: I don't hate braces, but spaces makes it more readable

Really?? This is my least favorite thing about Python. D: It can't possibly be more readable when you're talking about large code blocks. It just happens that we're never supposed to be talking about large code blocks in Python. "If you want to write a lot of code, you use another language," they say -- probably one with braces, which syntax highlighters can match-highlight on. In Python, you just hope the indentation is far enough to make it obvious where something ends and another thing begins.



If large indentations bother you, good. Braces or not, large indentations and large code blocks should make you start wondering how to refactor them.

And if Python's design seems to discourage over-indentation and oversized code blocks, brilliant.


Nope. The indentation bothered me for an hour one afternoon in the spring of 2001, then it dawned on me what a master stroke it was. Code with ~25% less redundant bullshit.

Less is definitely more here.




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

Search: