3 ms·
You must not have used Python or classes in C++, where the colon is ubiquitous? Does `{` not require shift on your keyboard?
by KerrAvon 4y ago
You must not have used Python or classes in C++, where the colon is ubiquitous?
Does `{` not require shift on your keyboard?
- dataflow 4y ago> You must not have used Python or classes in C++, where the colon is ubiquitous? You misread my comment. I'm talking about cases where existing prevalent syntax for that construct does NOT already require holding Shift. Python is better in this respect since ":" requires fewer presses of Shift than "{" or "}". This is not the case when you go from "int x = 1;" to "x: int = 1;". Moreover, the inconvenience of going from 1 Shift to 2 is not the same as the burden of going from 0 to 1. Especially because you can often combine the 2 into 1 without releasing the modifier key in between. And furthermore, variable declarations are far more common than class or function declarations, so you can't weight them equally.