logoalt Hacker News

donatjyesterday at 5:48 PM8 repliesview on HN

As someone who prefers tabs (I'm not looking to argue), I once asked Brendan Eich on Twitter why he prefers spaces. His answer was more thoughtful than I'd expected.

The tab key itself is hijacked by modern OS/UI behavior. It makes it complicated to actually type literal tab characters in certain contexts, particularly in the browser.

I still prefer tabs (and I'm a Go developer), but he is absolutely correct about that being a pain in the butt. For instance, try getting a tab character into the text area on Hacker News


Replies

tuetuopayyesterday at 7:06 PM

Yeah but, even ones that don't use literal tab characters use the tab key to write code, right? RIGHT? Like, does he hit space N times?

I somewhat get the argument, but if you're writing code in the HN textarea you're doing something wrong (for code where tab/space matters anyways). Like, any code editor will use the tab key properly.

Though, it sills maddens me there's no somewhat universal tab-entry in OSes like we have with enter (somewhat because there's a mix of shift+enter, alt+enter and cmd+enter). All of shift/alt/ctrl tab are usually also hijacked.

show 2 replies
zzo38computeryesterday at 6:22 PM

It might be reasonable to have a separate key for "tab" vs "next field", as well as separate key for "line break" vs "send". (But, tab and line break are not applicable for all contexts.)

However, it might also be reasonable to have a key or key combination (some programs use ^V) to enter control characters as data rather than as commands.

It might also be a consideration when designing a new computer (which does not have to be the same as existing ones); I had thought about such things and may make such a consideration.

show 1 reply
tophamyesterday at 6:42 PM

The fact that most people think the Tab key is the correct choice is a perfect example of why it was not.

It had a purpose, and it got hijacked and made its actual purpose more difficult to use.

It's not dissimilar to Apples initial Touch Bar and then removing the Escape key.

Average user might never use that key; average developer doesn't got long without using that key for its purpose.

show 1 reply
INTPenisyesterday at 6:00 PM

Non english speaker trying to wrap my head around what Brendan said to you.

I was once told that the tab key can be represented in different ways on different systems, and that's why spaces are safer because they're always represented the same.

Is that what Brendan was trying to say?

show 9 replies
OhMeadhbhyesterday at 6:30 PM

There's also the fact that no one seems to have tab stops set the same way.

show 1 reply
ameliusyesterday at 11:20 PM

CTRL+I?

sltkryesterday at 6:11 PM

Control-shift-u, 9, space/enter, works on most Linux systems.

To explain: control-shift-u allows entering a Unicode character by its hexadecimal code. This presumably depends on the Input Method Editor (IME) in use, which is something I've never fully understood, but this seems to work widely across different desktop environments (Xfce, KDE) and display servers (Xorg, Wayland).

thomas_viaeloyesterday at 6:05 PM

[dead]