DEV Community

Discussion on: Preemptive Pluralization is (Probably) Not Evil

Collapse
 
crabmusket profile image
Daniel Buckmaster

Robust code is optimized for change

Sandi Metz, in POODR, would call this "reasonable":

Code should be

  • Transparent The consequences of change should be obvious in the code that is changing and in distant code that relies upon it.
  • Reasonable The cost of any change should be proportional to the benefits the change achieves.
  • Usable Existing code should be usable in new and unexpected contexts.
  • Exemplary The code itself should encourage those who change it to perpetuate these qualities.

When code is reasonable, small changes are easy to make, even if big changes may be hard to make. It sounds like pre-emptive pluralization is a way to make code more reasonable!