4 ms·
Or use a language where '-' is allowed in identifiers. '-' looks better than '_' anyway. Personally, I decided a while ago that I spend such a disproportionate
by dkersten 15y ago
Or use a language where '-' is allowed in identifiers. '-' looks better than '_' anyway.
Personally, I decided a while ago that I spend such a disproportionate amount of time writing code that its worth my while to customise my keyboard layout to make writing code quicker and easier. I now use colemak with caps lock mapped to control and left control mapped to backspace. I also mapped alt-gr to hard to reach symbols (everything except those that are already on the main keyboard), and since I can tap alt-gr with my right thumb real easy, I can now type symbols like - = ( ) ! + * _ & @ ! 0 and others with ease (the listed symbols are the easiest symbols for me because I have them mapped to my left hand while my right hand presses alt-gr).
I spent ages debating with myself if its worth using a non-standard layout that I won't have on other computers, but in the end I figured I do so much coding on my own computer that if I had done this years ago (I used to think its not worthwhile), I would have saved a lot of effort.
Some people say that thinking about code is the slow part, not typing, but the way I see it is that the faster I can type code the more down-time I have for the thinking, the faster I can experiment in a REPL and the faster I finish mundane typing tasks where I don't need time to think.
I am now also planning on relearning my vi/vim commands to speed up my editing even more as I have forgotten a lot of what I knew a few years ago when I used vim a lot.
- ericrannaud 15y ago> Or use a language where '-' is allowed in identifiers. I have been a little obsessed with this question for a long time, and my interest in the LISP family of languages was in part driven by the use of '-'. This should have been a trivial consideration though. A keymap fix seems rather more logical than a change of language. I agree that being able to type code quickly and conveniently is important. We only have so much time, while we have so much code to write.
- dkersten 15y agoWell I didn't seriously mean that one should switch language to type faster, just that the "problem" does not exist in languages that allow '-' in identifiers and that I feel '-' also looks a lot more natural too. I personally write a lot of C++ and Python code, neither of which allow '-' in identifiers, but I often wish they did (and would happily give up the ability to omit whitespace around operators) and while we're at it, why not allow + ! * and ? too. Having said that, I'm all for switching languages (if your work allows it - I totally understand that some people won't have that choice) if it speeds up your development in some way.