Syntax Proposal: Allow Java-like Object Literals after constructor calls to set properties on created objects.

Maciej Stachowiak mjs at apple.com
Wed Jun 30 21:30:12 PDT 2010


On Jun 30, 2010, at 9:09 PM, Brendan Eich wrote:

> On Jun 30, 2010, at 7:37 PM, Mark S. Miller wrote:
> 
>> And you're right that attribute-property-missing -> undefined -> false has an effect here. If we had kept the ES3 negative names, we could have defaulted to false and Erik (I think) would not find Object.create a mistake -- but then the high-integrity-by-default fans would be put out. Those fans should speak up if they care to defend against the "mistake" charge.
>> 
>> Fine. Had it defaulted to low integrity, that would have been a mistake. Erik & I know we disagree on this.
> 
> 
> Allen seems to agree with Erik. Is this just a matter of personal opinion? The point that I don't see you responding to is that the Object.create defaults are opposite from what every other way of binding a property in the language uses.
> 
> Ok, that could be answered by arguing that Object.create needs different defaults for different use-cases from those other property-creating forms.

I think the fact that you have to go out of your way to get normal defaults is a considerable inconvenience in many situations. I think Object.create would be easier to deploy if its defaults matched other ways of creating properties.

Regards,
Maciej

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.mozilla.org/pipermail/es-discuss/attachments/20100630/f0fc5e37/attachment-0001.html>


More information about the es-discuss mailing list