Albin Jose@suppo.fi to Programmer Humor@lemmy.ml · 1 year agoComment Your Code Peoplesuppo.fiimagemessage-square119fedilinkarrow-up11.52Karrow-down125
arrow-up11.5Karrow-down1imageComment Your Code Peoplesuppo.fiAlbin Jose@suppo.fi to Programmer Humor@lemmy.ml · 1 year agomessage-square119fedilink
minus-squareauchschonda@feddit.delinkfedilinkarrow-up2·1 year agoModularity. Part of it is defining a proper Interface for using the hidden complexity. Exceptions are only one example. Functions can have behavior, inner states, prior calling requirements etc… you cannot read from its mere prototype. Do you really want everyone to read the inner code to learn that? Chances are that if documentation exists, it’s no longer up to date. This risk also applies to descriptive function names. They can be poor, wrong or outdated, too.
Modularity. Part of it is defining a proper Interface for using the hidden complexity.
Exceptions are only one example. Functions can have behavior, inner states, prior calling requirements etc… you cannot read from its mere prototype.
Do you really want everyone to read the inner code to learn that?
This risk also applies to descriptive function names. They can be poor, wrong or outdated, too.