Imagine that the project has a class through which work with the database is performed throughout the project, i.e. all models inherit it. And in order to make the code "pseudo-asynchronous", to get rid of unnecessary callbacks, there is an option to use yield . But the question is how correct it is, from all points of view, incl. and in terms of performance?
For example, how much better or worse to do this:
let row = yield data.getRowById(id); //обращение к БД than so:
data.getRowById(id,(data) =>{ let row = data; }); Well, it's one thing to use somewhere in one place, and another to use it everywhere in a project where it is possible instead of callbacks. Will I face something bad?