Good-bye constructor functions?

Brandon Benvie brandon at
Mon Jan 7 15:31:22 PST 2013

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 <brendan at> 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 at
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <>

More information about the es-discuss mailing list