2 ms·
The better solution to this is to use nested functions that are immediately called, rather than top level functions. That lets you cordon off chunks of state wh
by _dain_ 3y ago
The better solution to this is to use nested functions that are immediately called, rather than top level functions. That lets you cordon off chunks of state while still keeping a linear order of definition and execution. And you don't have to worry about inadvertently increasing your API maintenance burden because people started to depend on those top level functions later.
- jonahx 3y agoHa, I started writing my reply before seeing yours, and suggested almost the same thing.