- From: Tab Atkins Jr. <jackalmage@gmail.com>
- Date: Thu, 20 Jun 2013 19:07:56 -0700
- 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. ~TJ
Received on Friday, 21 June 2013 02:08:40 UTC