| ▲ | zahlman 3 days ago | ||||||||||||||||
> I have no idea why people want to "save time" to write short comments and short variable names Really long variable names put extra space between the operators and calls, which makes it harder to grok the logical structure of the expression. When I write `a + b` in code, it's in that order because the language demands it, and I use languages with that syntax for reasons of familiarity; but really, the `+` is the most important thing there, so it shouldn't be buried way off to the right. I don't like for variable names to mark type. `weight_radius_price` is fine (and usually much better than `wrp`, and definitely much better than `tuple` or `t`) but a) we know it's a 3-tuple because we can see the right-hand-side of the equals sign; b) the structure of the name already conventionally tells us to expect more or less that (although maybe a class or structure abstraction is missing?); c) the choice of a tuple is probably not really relevant in context as compared to other ways of sticking three atomic values together. | |||||||||||||||||
| ▲ | scoofy 3 days ago | parent [-] | ||||||||||||||||
> we know it's a 3-tuple because we can see the right-hand-side of the equals sign In the context I’m referring to, the variable may have been set 80 lines earlier, 7 years ago, when I was worse at coding. | |||||||||||||||||
| |||||||||||||||||