|
|
|
|
|
by rcfox
5227 days ago
|
|
The problem is that everyone has a different idea of what's nice to read. Some people are more comfortable with an algorithm in a for loop, while others would prefer to write it recursively. Who's to say which is objectively nicer to read? |
|
The one that's written clearly. An ugly, obfuscated loop is worse than clearly-written and commented recursion and vice-versa.
If the most pressing readability concern in your code is whether an existing loop would be more easily-read as recursion, you're already done. The code is clean enough. Move on.