3 ms·
Take a look at a picture of a mechanical typewriter: http://blog.gngcreative.com/wp-content/uploads/2015/02/mi0fg2Q.jpg http://blog.gngcreative.com/wp-content/
by dbrgn 8y ago
Take a look at a picture of a mechanical typewriter:
http://blog.gngcreative.com/wp-content/uploads/2015/02/mi0fg2Q.jpg http://blog.gngcreative.com/wp-content/uploads/2015/02/mi0fg...
Those metal things you can see there, those are tabstops. They are called tabstops because when you press the tab key, the carriage mechanically stops at the tabstop.
Tabstops were placed every 8 characters. A tabstop is simply a way to "type" 8 spaces with one keypress.
Github is not the only page that uses 8 spaces for a tab, and it's definitely not inexplicable. The Unix/Linux terminal uses 8 spaces by default if you insert a tab. Vim uses 8 spaces by default if you insert a tab. Python considers a tab to be equivalent to 8 spaces. I'm sure there are a lot of other systems that default to this value.
If you want to control how an indentation looks, use spaces. If you want tabs because the size is configurable and can be adjusted to one's preferences, you can't at the same time complain about "unreasonable configurations" that others use :)
- masukomi 8y ago> Tabstops were placed every 8 characters. A tabstop is simply a way to "type" 8 spaces with one keypress. tabstops were _not_ restricted to 8 characters. In many systems different tabstops were different widths from their predecessor. E.g. your first tabstop might be 20 characters in but all the ones after it would be 8 past their predecessor. Alternately you could vary all of them but that'd look pretty weird.
- dbrgn 8y agoThanks, TIL. But 8 was common, right? At least from online sources I was under the impression that typewriter tabstops were the reason for the 8 character default.
- IshKebab 8y agoOk but I don't know if you noticed but we don't use typewriters anymore.
- dbrgn 8y agoI was only answering to the assertion that tab-width of 8 is "inexplicable".