Although I already see flaws with that idea, since I just recently made use of Constructor.call(existingInstance) to reinitialize an instance to defaults. So nevermind that idea...
On Mon, Jan 7, 2013 at 6:31 PM, Brandon Benvie <bran...@brandonbenvie.com>wrote: > I also agree with the sentiment. Splitting allocation from initialization > helps to clarify the two separate roles that constructors have > traditionally filled, and how a class could/should diverge from that. The > class itself is the thing that should allocate the new object, the > constructor initializes newly minted objects. Perhaps a middle ground with > the backward compatibility issue that awb mentions would be that calling a > class is always treated as constructing it, in that it always allocates a > new object if it's not receiving a newly created one from a subclass that's > in the process of initializing. > > > On Mon, Jan 7, 2013 at 6:24 PM, Brendan Eich <bren...@mozilla.com> wrote: > >> Allen Wirfs-Brock wrote: >> >>> Even if we think we should discourage direct calls to class objects (I >>> think I'm now in that camp) >>> >> >> (Why so?) >> >> /be >> >> ______________________________**_________________ >> es-discuss mailing list >> es-discuss@mozilla.org >> https://mail.mozilla.org/**listinfo/es-discuss<https://mail.mozilla.org/listinfo/es-discuss> >> > >
_______________________________________________ es-discuss mailing list es-discuss@mozilla.org https://mail.mozilla.org/listinfo/es-discuss