Hi,

I sent the mail in attachment to the list, but it did not arrive yet, so I send it this way. It is exactly about making those two spec-wise the same thing. What do you think of it (since it DRYes it, it would not complicate the proposal and the resulting spec and language could have the consistency for this "hard-wired")?

Herby

Allen Wirfs-Brock wrote:
On May 29, 2012, at 11:17 AM, Herby Vojčík wrote:

Couldn't all this be solved by allowing = also for object literals
and promoting its use? People get used to the fact that = is the
"normal" way and : is the "special" way plus they are told JSON
only has : for both historical and security reasons.

Because I feel the main problem felt here is "don't help developers
do [[DefineProperty]] all over". I say : should definitelybe there
(consistency, I value it very highly, so no = only), but by saying
"using = is the right style" people can move away from using : in
literal, so they will also not use it in mustache.

I actually considered including the above in my proposal precisely
for consistency and the reasons that have been discussed on this
thread.  However, I ultimately decided against including it.
Primarily because it  further complicate the proposal and yet didn't
seem to have compelling use cause = semantics in the new object
(object lit) case.

I'm not necessarily opposed to it, if it would address these
concerns.

Allen
--- Begin Message ---
Hello,

to make things more DRY in spec and more consistent, what if {some_content} in expression context would be defined as syntactic sugar for (new Object).{some_content}?

Herby

--- End Message ---
_______________________________________________
es-discuss mailing list
es-discuss@mozilla.org
https://mail.mozilla.org/listinfo/es-discuss

Reply via email to