Killing `Promise.fulfill`

Domenic Denicola domenic at domenicdenicola.com
Wed Aug 21 19:04:57 PDT 2013


I am generally against sacrificing things for polyfillability. I'd rather say "if you're using this polyfill and need security guarantees, use `Promise.as` (or `Q`, even); if you want forward-compatibility at the expense of security, use `Promise`."

Other options could involve using the module system. Indeed, all static methods could in theory move there. The default export even could be the coercer (like it is with Q today).

```js
import { toPromise as Q, every, some, Promise } from "@promise"; // renaming to Q for brevity

// or maybe

import Q from "@promise";
import { every, some, Promise } from "@promise";
```


More information about the es-discuss mailing list