One of my previous approaches was making the validations async. That... worked. But I don't consider it to be ideal. Not that I have any problem with the concept of async/await, but it's kinda like a virus that spreads beyond its originally-intended borders, cuz awaitmust be inside async. And once you make a function async, it returns a promise, that (depending upon your project and your inspections) either should or must be handled. Which too often leads to making the caller async, which in turn leads to the caller's caller being made async...
Before you know it, every dang function is async - which makes everything kinda messy for no good reason.
One of my previous approaches was making the validations async. That... worked. But I don't consider it to be ideal. Not that I have any problem with the concept of
async/await
, but it's kinda like a virus that spreads beyond its originally-intended borders, cuzawait
must be insideasync
. And once you make a functionasync
, it returns a promise, that (depending upon your project and your inspections) either should or must be handled. Which too often leads to making the callerasync
, which in turn leads to the caller's caller being madeasync
...Before you know it, every dang function is
async
- which makes everything kinda messy for no good reason.Agreed.