3 ms·
There is nothing wrong with using callbacks. Or promises. Or async/await. Or any other abstraction that makes sense for you.
by elmigranto 10y ago
There is nothing wrong with using callbacks. Or promises. Or async/await. Or any other abstraction that makes sense for you.
- zaphar 10y agoThis is a "writing code"-centric point of view. From the maintenance perspective "you" aren't the only person for whom the tradeoffs of callbacks/promises/async-await matter. It also matters to the people who have to come along years later and maintain the software. So really it's about what abstraction makes sense for the maintainers as well. Not just you.
- elmigranto 10y ago> people who have to come along years later and maintain The problem is there is no way to know years in advance what makes sense for those future people. All you have is current standard at your org and/or common sense. Do what they say. When you choose what the standard is, select whichever makes more sense at the moment. That is kind of my original point.
- zaphar 10y agoYou may not know their own personal preference when writing code. But you can know what will make their job easier. Strong typing for instance will make refactoring easier. Good perf tooling will make analyzing performance easier and so on.