Highlights
Suivre


Sondage

How many spaces per tab do you prefer?



Alexander Denman
Alexander Denman le 13 Juin 2024 à 20:11
I use tabs, not spaces
Bo Miller
Bo Miller le 30 Avr 2024
I prefer 5. 4 can be a bit hard to differentiate from other formating, and 6 takes up too much space; though space considerations do fee a little arbitrary considering that most developers I've encountered prefer to use at least 2 monitors. I do try to keep to the python style guid as far as line width, but I sometimes wonder if we really need to be concerned about people reading code on legacy monitors.
Christian Schröder
Christian Schröder le 30 Avr 2024
In my own projects, I find that four is the most visually pleasing, a good balance etween readability and not wasting screen real estate. That said, I like that MATLAB allows you to choose for yourself.
Christopher Stapels
Christopher Stapels le 29 Avr 2024
Used to be 5, but that wasnt even a choice. 2 since I learned Python
David
David le 29 Avr 2024
Obligatory Silicon Valley reference :)
Rik
Rik le 28 Avr 2024

I once followed a course where the instructor argued for 8 spaces AND a limit of 80 characters per line. His reason was that it forces you to reconsider any code that requires 3 levels of indentation, since that is really ugly. There is something to that reasoning, but I don't think it makes sense outside of a teaching context.

DGM
DGM le 28 Avr 2024
Depends. Usually 4. In something like openSCAD, there tends to be a lot more indentation, so I'd rather use 2, or change my indentation style.
Definitely never 8, and definitely never spaces.

Tags

Aucun tag saisi pour le moment.