4 ms·
I've heard of this before. Do you have to hit some sort of modifier to get them? Does that not make indexing arrays extremely annoying, or is it really not that
by deathanatos 10y ago
I've heard of this before. Do you have to hit some sort of modifier to get them? Does that not make indexing arrays extremely annoying, or is it really not that big a deal?
- desdiv 10y agoTo be fair, () are more common than [] in most programming languages, and you need modifier keys to get () for most keyboard locales. Yet not many people complain about ().
- tqkxzugoaupvwqr 10y agoIn the German Mac keyboard layout, brackets [ ] and curly braces { } need the ALT modifier. “[” is ALT + 5, “]” is ALT + 6. You get used to it. With smart editors, writing “[” automatically creates its counterpart “]”, same for curly braces, so the typing effort is kept within limits. (I have never used a US keyboard layout. Maybe typing programming symbols could be so much easier and I have never experienced it.)
- cstejerean 10y agoI don't think it's a huge difference. Both () and {} require shift modifiers on US layouts, and they are both used extensively in most programming languages, far more than [] and nobody seems to complain.
- rcarmo 10y agoActually, there is, because indexing elements in arrays is a fairly common operation and when I use a US layout, it's so much easier. In fact, a lot of the contortions we have on EU keyboards are a pain to go back to once you've gotten used to a US layout, because there are decades of lore and history around US-layout TTYs that influenced programming language designs.
- etatoby 10y agoI've been touch typing on Programmer Dvorak for more than a decade. If you type programming symbols all day long it's unbeatable: http://www.kaufmann.no/roland/dvorak/ http://www.kaufmann.no/roland/dvorak/
- tinodotim 10y agoOn Mac: alt + 5/6 On Windows: CTRL & Alt / Alt GR + 8/9 At least on german keyboards which should be the same as on the portuguese ones
- rcarmo 10y agoIt's not a problem for coding, although I've taken to using a US keyboard of late with my iPad and find it easier to code in C and Python.
- pdpi 10y agoIt's annoying as hell. {} is even worse though, shift-alt-8/9 iirc (I've moved to a US layout years ago precisely because of this, and haven't looked back)