Skip to content
This repository has been archived by the owner on Jan 25, 2022. It is now read-only.

change properties to be non-configurable #6

Merged
merged 1 commit into from
Nov 17, 2015

Conversation

michaelficarra
Copy link
Member

No description provided.

@michaelficarra
Copy link
Member Author

Hmm, this won't work right. I'll let you know when I update this PR so that multiple properties with the same name are supported.

@jeffmo
Copy link
Member

jeffmo commented Sep 24, 2015

It would be very unexpected for instance properties to be non-configurable by default as this is not how they work today (and often not how they are intended to work). For intentionally non-configurable properties, I think a @nonconfigurable decorator is likely the appropriate solution.

@michaelficarra
Copy link
Member Author

I think this is fine. Like we did with classes and arrows/methods, we can make the new form more restricted because the 99.99% case wants this. Nobody uses delete. And if they do, they can add properties using assignment or explicitly set the descriptor's configurable flag or use a decorator as you suggest.

@jeffmo
Copy link
Member

jeffmo commented Sep 25, 2015

Ok, that's compelling. For some reason I thought there were more restrictions associated with non-configurable, but I was wrong and it seems pretty reasonable

@michaelficarra
Copy link
Member Author

After further research, it appears that no more work is required here. ValidateAndApplyPropertyDescriptor handles the configurability for us in just the way we want.

@jeffmo Please review.

@michaelficarra
Copy link
Member Author

@jeffmo Rebased.

jeffmo added a commit that referenced this pull request Nov 17, 2015
change properties to be non-configurable
@jeffmo jeffmo merged commit 24232cb into tc39:master Nov 17, 2015
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants