5 ms·
1) I'm not defending the implementation of is-promise. I don't care to, I'm not a javascript developer. 2) > sure there are non standard promises, ancient st
by staticassertion 6y ago
1) I'm not defending the implementation of is-promise. I don't care to, I'm not a javascript developer.
2)
> sure there are non standard promises, ancient stuff, that to me shouldn't be used
If you're building a library, or maintaining one that's been built over many years, you can't easily make calls like that.
- dragonwriter 6y ago> If you're building a library, or maintaining one that's been built over many years, you can't easily make calls like that. Well, you can, and in the JS ecosystem you'll often find cases where there are two libraries (or two broad classes of libraries) for a certain function that make different choices, one of which makes the simple, modern choice that doesn't support legacy, and one that does the complex, messy thing necessary to deal with legacy code, and which you use depends on your project and it's other constraints.
- staticassertion 6y agoOK, then the legacy library can't easily make that choice. I'm not saying every single javascript developer should be accepting async or sync callbacks, just that some libraries are choosing to do that for legitimate reasons.