Tabs vs Spaces Debate

This cluster revolves around the classic programming debate on whether to use tabs or spaces for code indentation, discussing pros like consistency, readability, accessibility, and editor settings.

➡️ Stable 0.5x Programming Languages
4,412
Comments
20
Years Active
5
Top Authors
#9370
Topic ID

Activity Over Time

2007
1
2008
36
2009
61
2010
86
2011
114
2012
155
2013
293
2014
219
2015
171
2016
442
2017
516
2018
219
2019
378
2020
245
2021
349
2022
263
2023
293
2024
276
2025
289
2026
6

Keywords

e.g twitter.com PDF HTML NOT IDE TAB DPI PI emacswiki.org tabs spaces tab indentation editor makefile characters elastic text editor alignment

Sample Comments

slater Jun 28, 2022 View on HN

How can anyone in their right mind use spaces instead of tabs?

tmccrary55 May 17, 2021 View on HN

What about people who use tabs and spaces?

remram Dec 29, 2021 View on HN

Why do you need to distinguish tabs from spaces?

baal80spam Jun 20, 2017 View on HN

Let's not forget tabs vs spaces.

dboreham Jul 28, 2017 View on HN

It's fine as long as you use spaces not tabs.

high_byte Jan 30, 2023 View on HN

you mean you were wrong to use tabs your whole life instead of space? ;)

egwynn May 30, 2016 View on HN

Ideally tabs. That's what they're for. But at some point someone on your team who doesn't understand the difference is gonna start making changes and screw it all up. Because of this, I use spaces. That way it always looks the way I intend it to look no matter how poorly the viewer's text editor is configured.

How important it is to use spaces - not Tabs - when writing software.

DonHopkins Feb 9, 2024 View on HN

Using tabs instead of spaces is unethical too!

akka47 Dec 31, 2020 View on HN

what's wrong with setting tabs to 4 spaces?