6 ms·
Stopped reading after 2 spaces. 4 spaces is the law!
by MrDosu 12y ago
Stopped reading after 2 spaces. 4 spaces is the law!
- Bahamut 12y agoI think you'll find that most frontend developers despise 4 spaces...at least that I've come upon anyhow. I only ever met one developer that liked 4, and that person is a tab guy to boot.
- Raphmedia 12y agoI'm a front-end guy and I love my 4 spaces. Helps a lot with complicated HTML to have the extra spaces to easily see what is what. It's also very useful in SASS and Less, where you have nesting.
- MrDosu 12y ago"I'll think you find that most..." is the start of no compelling argument ever 0o
- progx 12y agoOh oh lets fight ;-) 2 Spaces, 4 Spaces, 1 Tab (view as 2 Spaces or 4 Spaces). Important is to configure once your favorite Editor and use it consequent.
- madeofpalk 12y agoAs someone who prefers tabs, but doesn't care enough so will happily use spaces, I've never understood the hatred around tabs. Not only does it remove the 2 vs 4 spaces debate (just set your browser preferences to display it as whatever!), it's more 'semantically correct' - it's literally saying "one level of indentation please". Anyway, not that I particularly care - I just always found it amusing that this is where developers have chosen against things being semantically correct and user-configurable.
- titusjohnson 12y agoI used to prefer tabs (for the exact reason, tabs indicate an indent, spaces indicate a space) except for one edge case that has me using spaces now. If you're anal about making sure chained method calls line up on their own lines, spaces guarantee that across the board, but tabs would mess up the indent. var foo = SomeTerriblyLongHorrificClass->withUnreasonablyLargeChildren() ->dueToTheOddNumberOfCharachters() ->sometimesItsNiceToUseSpaces() ->here()
- madeofpalk 12y agoIf you were really committed, you would have renamed your names to force them to line up with tabs :)
- MrDosu 12y agoi like this guy
- deleted 12y ago[deleted]