4 ms·
It does if you're using Python...
by Wilduck 15y ago
It does if you're using Python...
- evincarofautumn 15y agoNo, 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.
- pigs 15y agoPEP8 recommends spaces: http://www.python.org/dev/peps/pep-0008/ http://www.python.org/dev/peps/pep-0008/
- Wilduck 15y agoThat'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.
- vilya 15y agoIt 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).