W3C home > Mailing lists > Public > whatwg@whatwg.org > June 2013

Re: [whatwg] Proposal: createImageBitmap should return a "Promise" instead of using a callback

From: Tab Atkins Jr. <jackalmage@gmail.com>
Date: Thu, 20 Jun 2013 19:07:56 -0700
Message-ID: <CAAWBYDB4qLV1qLOCnTE+FRNbC=dED0b=Aa+vYhPeLStnzJYWKg@mail.gmail.com>
To: Anne van Kesteren <annevk@annevk.nl>
Cc: Justin Novosad <junov@google.com>, WHATWG <whatwg@whatwg.org>
On Thu, Jun 20, 2013 at 6:44 PM, Anne van Kesteren <annevk@annevk.nl> wrote:
> On Thu, Jun 20, 2013 at 11:08 PM, Justin Novosad <junov@google.com> wrote:
>> I agree it would be nicer, but it seems less consistent with other existing
>> APIs.
> The factory methods we have thus far should probably not be taken as
> precedent. Almost nobody likes them. URL.createObjectURL() is somewhat
> like this, although it returns a string and not a URL object.

And, just to get ahead of any responses along the lines of "well, why
are we doing a factory function here, then?"...

1. It's explained in the OP - we really shouldn't be using real
constructors for this idiom.
2. The reason nobody likes them is because they *should* be
constructors, but we got saddled with silly factory functions instead
because of Java legacy.

Received on Friday, 21 June 2013 02:08:40 UTC

This archive was generated by hypermail 2.3.1 : Monday, 13 April 2015 23:09:22 UTC