Darien Valentine (2017-07-30T15:34:20.000Z)
valentinium at gmail.com (2017-07-30T15:37:19.005Z)
While static analysis is one advantage, there are additional reasons for this to be a syntactic proposal. A helper method like `Map.fromObject` could indeed be a useful addition to the language (though it is simple enough to do already: `new Map(Object.entries(obj))`) — however that does not work for maps whose keys are not also valid property keys. In general I’m in the less-new-syntax camp, but I find this idea intriguing. My initial impression is that it’s fairly convincing, mainly because my (purely anecdotal) experience is that it is an attempt to solve a real problem — many devs seem to be reluctant to use `Map` and `Set`, despite knowing they exist and are sometimes more appropriate models, and I think it is in part due to their "second class" nature; in ES folks are accustomed to "seeing" data structures. Similarly there is reluctance to work with subclasses of data structures, which are put on equal-footing by this proposal. The `#` is indeed ugly, but the particular symbol I imagine is highly bikesheddable and consideration of it could probably be deferred till it’s determined whether the core ideas of the proposal represent a worthwhile addition. FWIW though, one alternative might be _no_ symbol; `Map {}` (with a "No Line Terminator Here") is currently invalid syntax.