The enduring religious war among programmers revolves around the choice between using spaces or tabs for indentation, a debate that shows no signs of resolution anytime soon.
This issue resurfaced recently when The Register discovered that Linus Torvalds made a code change in the Linux kernel. The only modification in this patch was switching spaces to tabs.
However, Linus did not pick a side in this religious war solely for the sake of it. His reason was that the file he edited, Kconfig, functions as a configuration file for the kernel (similar to YAML today) and some older parsers were not parsing spaces and tabs correctly, leading to errors.
What’s intriguing is that Linus did not make the file Kconfig easier to read, but instead intentionally made it more complex by converting regular spaces to tab characters with a width of 8. This deliberate move aimed at forcing some parsers to fail, prompting the developers to revisit and correct their parser code.
Linus explained his actions by stating, “Let’s make sure it gets fixed. Because if you can’t parse tabs as whitespace, you should not be parsing the kernel Kconfig files.”
Source: The Register, Image from Reddit r/programming
TLDR: Linus Torvalds stirred the eternal spaces vs tabs debate by intentionally complicating the Linux kernel configuration file to expose parser errors.
Leave a Comment