Three-Tier Hoisting: default to local, earn each tier upward

https://prickles.org/tenet/three-tier-hoisting/A2

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.

20 points · 0 comments · view on lemmy.world

0 Comments

No comments yet.