Dmitry Soshnikov (2014-10-02T03:33:55.000Z)
On Wed, Oct 1, 2014 at 4:51 PM, Brendan Eich <brendan at mozilla.org> wrote:

> Dmitry Soshnikov wrote:
>
>> Not ideal either. Usually langs provide nice declarative syntax for such
>> things. E.g. we have[1] the same in the HACK language, and use it well
>> everyday when need a map.
>>
>> But this part is of course not for ES6, hope ES7-ish.
>>
>> [1] http://docs.hhvm.com/manual/en/hack.collections.map.php
>>
>
> We could definitely have Map and Set literals:
>
> const map = {1 => "one", "two" => true, false => "three"};
>
> const set = {<1, "two", false>};
>
>
Yeah, something like this (I actually like these two forms); later for ES7.


> If you still buy Harmony of My Dreams, prefix # before { to get immutable
> value-type forms.
>
>
Yep, why not, can be (re)considered as well I guess.

Dmitry
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.mozilla.org/pipermail/es-discuss/attachments/20141001/a42f9c8f/attachment.html>
forbes at lindesay.co.uk (2016-02-01T12:19:33.042Z)
> ```js
> const map = {1 => "one", "two" => true, false => "three"};
>
> const set = {<1, "two", false>};
> ```

Yeah, something like this (I actually like these two forms); later for ES7.


> Prefix `#` before `{` to get immutable value-type forms.

Yep, why not, can be (re)considered as well I guess.