On Thu, Jun 20, 2013 at 6:44 PM, Anne van Kesteren <ann...@annevk.nl> wrote: > On Thu, Jun 20, 2013 at 11:08 PM, Justin Novosad <ju...@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