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

It does if you're using Python...



No, it doesn’t. Your indentation level matters, but provided your indentation is consistent, it doesn’t matter whether you use tabs or spaces, and the notion of “column” isn’t relevant to proportional-width fonts. If you’re worried about invalid indentation hiding from you, don’t use spaces for indentation with a proportional font—it doesn’t make sense anyway.


It matters more when you've got a statement broken over multiple lines. If you've got a function which takes a lot of arguments for example, lining them all up vertically can make the code a lot easier to read. This can be difficult or impossible to do with a proportional width font (and would almost certainly look very strange to anyone else looking at the code in a fixed-width font).


That's understandable. I agree that tabs would work much better than spaces with a proportional font. However, in the case of Python PEP 8 states that you should use 4 spaces. Not doing so will make it very hard to collaborate with other devs.

It's not that I think that proportional fonts couldn't work (even with python) It's just that I have concern about visually assessing indentation. Maybe it's time I try one and find out.





Consider applying for YC's Spring batch! Applications are open till Feb 11.

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

Search: