3 ms·
I don't understand. I think the term "fish" was defined in the text, so fish is akin to a variable name with its true identity defined in a single place. So the
by bko 4y ago
I don't understand. I think the term "fish" was defined in the text, so fish is akin to a variable name with its true identity defined in a single place. So they wanted to add something to the term "fish" so they changed that one place.
Seems more sensible and less error prone than using "fish, mollusks..." everywhere and doing a ctrl+f and adding a ", bees" everywhere. Doing the ctrl+f approach would be the hack IMO. I guess they could have changed the variable name as well but legal documents probably aren't written in IntelliJ or some other tool where you can confidently believe that you changed every occurrence. Plus, you don't have compiler warnings!
Unless I'm misunderstanding something or your comment...
- tptacek 4y agoI suppose the "clean code" solution implied here is to change the term "fish" to something like "species of concern".
- xsmasher 4y agoYes - redefining "fish" is similar to "#DEFINE ONE = 0.99" It's a landmine for future developers who want to parachute in, understand what is happening, make a fix, and jetpack out again.