|
|
|
|
|
by nailer
3253 days ago
|
|
Direct style is easier to reason about. Control passes onto the next line consistently, for both async and sync operations. Do you really prefer callbacks or just use them because they were once necessary? Are they so good you'd use them for sync operations too? add(a, b, function(sum){
....
})
Personally: that seems like a waste of time. I'd rather just do: var sum = a + b;
Likewise I'd rather do: var response = await superagent.get('https://...')
|
|