Open relu91 opened 2 years ago
Could it be an artifact from the days of JS where promises were polyfilled?
Could it be an artifact from the days of JS where promises were polyfilled?
Actually, promisify is a nodeJS module to transform callback programming style in Promises. I don't think is an artifact...
By an artifact, I meant that the module was used since the baked in Promise was not available and simply stayed there even though that the new promise pattern became available. I think we should simply use the baked-in way since new Node.js developers probably do not even hear about the promisify way :)
It seems that promisify
does something more. Read this best practices
I think in most places, we use the new Promise
pattern by now – should we still try to perform an alignment? Or is the current state fine as it is?
Personally I am fine with the status quo. Does anyone insist of doing (more) alignments?
In some tests, we use
promisify
where the other places we use thenew Promise
pattern. Personally, I foundpromisify
less verbose and more explicit, but we have to choose a consistent pattern for the codebase._Originally posted by @relu91 in https://github.com/eclipse/thingweb.node-wot/pull/579#discussion_r728727283_