https://github.com/jbenet/transformer/commit/8b2349a makes this happen, by deferring in the conversion callback wrapper. So now, whether a user defers or not, the callback is deferred. Remaining question is whether to make users defer anyway.
var defer = // defer implementation
module.exports = Conversion(Ascii, Base32, convert);
function convert(ascii, callback) {
defer(callback, base32.encode(ascii));
};
As mentioned above, they both do the same now. One is "more right" because deferring is what should happen, so it's easier to know it's happening when you do it up-front. The other is more concise.
IMO it's kind of annoying to force users to do the latter, if we can handle it correctly in either case.
Callbacks should always be deferred. See:
https://github.com/jbenet/transformer/commit/8b2349a makes this happen, by deferring in the conversion callback wrapper. So now, whether a user defers or not, the callback is deferred. Remaining question is whether to make users defer anyway.
is nicer than
As mentioned above, they both do the same now. One is "more right" because deferring is what should happen, so it's easier to know it's happening when you do it up-front. The other is more concise.
IMO it's kind of annoying to force users to do the latter, if we can handle it correctly in either case.