3 ms·
This is a really good insight. There are some architecture decisions you really need to anticipate because if you don't, it will really be a pain in the ass to
by earthboundkid 6y ago
This is a really good insight. There are some architecture decisions you really need to anticipate because if you don't, it will really be a pain in the ass to refactor.
I'm most familiar with Go, and there I've gotten very used to the idea that my functions will probably need an error return, so e.g. I write my main func to call into a run(...) error func first thing. I've had to go back and replumb things with context, and it's no fun. Similar strategies apply in JavaScript, where you just know that any kind of button press will probably need to be a Promise because it might have to wait on a network call or whatever. It's a pervasive problem.
- littlestymaar 6y agoIn a perfect word, this kind of refactor should be handled by the tooling (IDE/Language Server) though.