▲ | l-albertovich 2 days ago | |||||||||||||||||||||||||
Just for fun I reformatted it minimally in the conservative way I write code that is intended to be easy to read and understand to improve the odds of future contributors (or future me) introducing a bug in it due to misunderstanding it. It's painfully verbose but I think it's worth it considering that we're in 2025 and we're not limited to one character variable names. https://gist.github.com/leonardo-albertovich/984fff0825ff8fe... | ||||||||||||||||||||||||||
▲ | teo_zero 2 days ago | parent [-] | |||||||||||||||||||||||||
Sorry but you didn't just reformatted it, you added new variables and return statements that were not in the original code (and even introduced bugs like row 41). As of short variable names, I'd argue that they are actually more readable than long ones when they're the iterator of a loop:
What else can "e" stand for in the body of this loop?Longer lifetimes and not-as-obvious scopes do deserve longer names. Finally, I strongly dislike this kind of reversed conditions:
To paraphrase your own words, we're in 2025 and we should not be limited by our fear of forgetting one "=". | ||||||||||||||||||||||||||
|