Posted on: January 6, 2022
Posted by: admin
The rule: One way of doing something is better than two.
So when the language gets a new way of doing something that is only slightly better than the previous version, or not better at all, I always stick with the way I was doing it before. That way when reading the code I never have to wonder why did the author choose this way in one place and another way elsewhere.
Coding tricks is not why we program -- we program to create new utility, and to create something that is easy not to break when it needs maintenence.
It's very common and imho totally wrong to not adopt the conventions of code you're contributing to.
Another way of emphasizing prior art.
If you can get to zero ways of doing something that's way better than one, and way-way better than two or more.
See the rule in the standards-makers howto. It's the same idea.
Sometimes I don't have time to write a full prose version of a post, I think it's better to write the skeletal version rather than publish nothing at all.
Likes Posted on: January 6, 2022