On May 29, 2012, at 10:08 AM, Tab Atkins Jr. wrote: > Given that these two are identical to most devs, giving them distinct > syntaxes in the strawman is problematic. Further, and much more > importantly, [[DefineOwnProperty]] is *nearly never* the behavior that > a dev will actually want. Devs are *not* going to be replacing all > their Object.defineProperties() calls with monocle-mustache, because > *no one actually uses that function* in normal production, so there's > nothing to replace. Normal devs do a lot of property assigning, > though, and that's the use-case we're targetting with this.
Yes yes yes. > If it's desperately important that we don't make "obj.{foo:bar}" do a > [[Put]], then it would be much better to simply not allow that syntax > *at all*. Make monocle-mustache solely use the "obj.{foo=bar}" > syntax, so that the other one is a syntax error. Yes again. I don't see enough evidence that DefineOwnProperty is important enough of an operation to warrant dedicated syntax. Syntax should be reserved for the absolute most common operations of the language. Corner case operations should remain as API's. If Object.defineProperties is too cumbersome (and it is), we should standardize nicer API's for it. > There's no good > reason to give devs the other type of functionality besides > completeness, and using it will almost always be a mistake on the > dev's part, I think. Yes. (Did I mention yes?) Completeness is an anti-goal for syntax. Dave _______________________________________________ es-discuss mailing list es-discuss@mozilla.org https://mail.mozilla.org/listinfo/es-discuss