title: What is the explicit promise construction antipattern and how do I avoid it?
body: <p>I was writing code that does something that looks like:</p>
  
  <pre><code>function getStuffDone(param) {           | function getStuffDone(param) {
      var d = Q.defer(); /* or $q.defer */ |     return new Promise(function(resolve, reject) {
      // or = new $.Deferred() etc.        |     // using a promise constructor
      myPromiseFn(param+1)                 |         myPromiseFn(param+1)
      .then(function(val) { /* or .done */ |         .then(function(val) {
          d.resolve(val);                  |             resolve(val);
      }).catch(function(err) { /* .fail */ |         }).catch(function(err) {
          d.reject(err);                   |             reject(err);
      });                                  |         });
      return d.promise; /* or promise() */ |     });
  }                                        | }
  </code></pre>
  
  <p>Someone told me this is called the "<strong>deferred antipattern</strong>" or the "<strong><code>Promise</code> constructor antipattern</strong>" respectively, what's bad about this code and why is this called an <a href="https://en.wikipedia.org/wiki/Anti-pattern" rel="noreferrer">antipattern</a>?</p>