One of the tenets from a software-craft site I've been building. The idea is to keep state and dependencies as local as you can, and only promote something to a wider scope (module, shared, then global) once it's actually used widely enough to earn it. Most of the 'shared' code I've had to untangle started local and got hoisted up a tier too early.
Three-Tier Hoisting: default to local, earn each tier upward
https://prickles.org/tenet/three-tier-hoisting/A2
0 Comments
No comments yet.