Hi folks, opinionated piece of potentially X-Y problem following:
Since 0.19, collision between parameters and declarations is not allowed anymore, allowing better machine understanding of our code from the machine and helps at reducing output size. It’s a noticeable change in the day to day coding because, well, things can collide often.
I’ve mostly seen in the wild appending an underscore_. Though, I recently found myself appending an underscore_ to most function parameter names in a personal project, so as an experiment I decided to put it on every single parameter as it saves me some brain power while deciding if it needs one or not. I like that code guideline, but I find it far from ideal mostly because it messes with my autocomplete and also because I find it visually hard to spot mistakes.
As the title states, I’m fairly convinced that a suitable option would be allowing name parameters to start with an _underscore (it’s currently forbidden by the compiler), as it would narrow autocompletion list from the start. It would also be possible to treat those names differently in the syntax highlighting, for those who choose it as a coding style to make it visually spot on.
What do you think? What’s is your favourite way of getting around that limitation? As you may have found a better solution.