highland icon indicating copy to clipboard operation
highland copied to clipboard

Make .toPromise attempt to use default Promise constructor

Open kirly-af opened this issue 6 years ago • 3 comments

Hi,

I don't understand what's stopping .toPromise() to try to use the default Promise constructor if none is passed as argument? I really think this should be the default behavior.

kirly-af avatar May 11 '18 16:05 kirly-af

Have you seen the discussion in the original PR? https://github.com/caolan/highland/pull/628#issuecomment-306671817

Basically, I was uncomfortable with writing code that implicitly depends on a JS feature that doesn't exist in all execution environments without a proper fallback.

On Fri, May 11, 2018 at 11:32 AM, Alexandre [email protected] wrote:

Hi,

I don't understand what's stopping .toPromise() to try to use the default Promise constructor if none is passed as argument? I really think this should be the default behavior.

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/caolan/highland/issues/647, or mute the thread https://github.com/notifications/unsubscribe-auth/AGIyZVZVQ-EFWWLjdbNo3OxuMAOBj5u6ks5txb0qgaJpZM4T7u99 .

vqvu avatar May 11 '18 19:05 vqvu

Hi @vqvu, sorry for the late reply.

I understand you avoid default arguments values, though is it still a problem to depend on Promise nowadays? It's standard, widely used and available in most environments.

kirly-af avatar May 23 '18 08:05 kirly-af

IE11 is still a thing, unfortunately :(.

On Wed, May 23, 2018 at 3:14 AM, Alexandre [email protected] wrote:

Hi @vqvu https://github.com/vqvu, sorry for the late reply.

I understand you avoid default arguments values, though is it still a problem to depend on Promise nowadays? It's standard, widely used and available in most environments.

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/caolan/highland/issues/647#issuecomment-391260751, or mute the thread https://github.com/notifications/unsubscribe-auth/AGIyZVburVnze8f6bK9oW8u5jhBpQax1ks5t1Rp2gaJpZM4T7u99 .

vqvu avatar May 23 '18 20:05 vqvu