On Tue, May 29, 2012 at 11:30 AM, Allen Wirfs-Brock
<[email protected]>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.
>
I don't share most of the concerns that have been raised in this thread.
However, I find the argument from consistency compelling. I would like the
object literal syntax to be the same as the apparent object literal syntax
that appears in moustache. We should allow "=" either in both places or
neither. I prefer both. But I mildly prefer neither over including it in
just one of these.
>
> Allen
>
>
>
>
>
--
Cheers,
--MarkM
_______________________________________________
es-discuss mailing list
[email protected]
https://mail.mozilla.org/listinfo/es-discuss